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

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

Overview

Submit button field for form submission.

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

  • On the web, translates to input which provides built-in browser functionality like submitting on Enter key and remembering values for autofill

  • Can attach name-value params (unlike regular buttons)

  • Has default onClick behavior so no need to manually specify form submission

Examples:

Basic submit button

form.fields_submit text: 'Submit'

See Also:

Instance Attribute Summary

Attributes inherited from JsonUiElement

#json, #page

Method Summary

Methods inherited from AbstractField

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

Methods inherited from View

component_name

Methods inherited from JsonUiElement

action, any, array, badgeable, bool, color, component_name, date, date_time, enum, float, hash, icon, #initialize, int, length, menu, panels_builder, #props, required, singleton_array, string, text, url, views

Constructor Details

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