Class: Glib::JsonUi::ViewBuilder::Fields::Submit

Inherits:
AbstractField show all
Defined in:
app/helpers/glib/json_ui/view_builder/fields.rb

Overview

Benefits of using ‘fields/submit` over `button`

  • On the web, it translates to input which provides builtin functionality such as submitting upon pressing enter on a field and remembering values for autofill.

  • We can attach name-value param to it. See www.w3schools.com/tags/att_button_value.asp

  • It has a default onClick so no need to specify ‘onClick: ->(action) { action.forms_submit }`

Instance Attribute Summary

Attributes inherited from JsonUiElement

#json, #page

Method Summary

Methods inherited from AbstractField

#context, #created, #default_url_options, #determine_value, #hint, #hint_args, #label, #label_args, #name, #placeholder, #placeholder_args, #prop, #value

Methods inherited from View

component_name

Methods inherited from JsonUiElement

#initialize, #props

Constructor Details

This class inherits a constructor from Glib::JsonUi::JsonUiElement