Class: Avo::Fields::HiddenField
- Defined in:
- lib/avo/app/fields/hidden_field.rb
Instance Attribute Summary
Attributes inherited from Field
#block, #component, #computable, #default, #format_using, #help, #id, #is_array_param, #is_object_param, #name, #null_values, #nullable, #placeholder, #readonly, #required, #sortable, #updatable
Attributes included from FieldExtensions::VisibleOnDifferentViews
#show_on_create, #show_on_edit, #show_on_index, #show_on_show
Instance Method Summary collapse
-
#initialize(name, **args, &block) ⇒ HiddenField
constructor
A new instance of HiddenField.
Methods inherited from TextField
Methods inherited from Field
#database_id, #fetch_for_action, #fetch_for_resource, #fill_field, #has_own_panel?, #hydrate_field, #resolve_attribute
Methods included from FieldExtensions::HasFieldName
#field_name, #field_name_attribute, #get_field_name
Methods included from FieldExtensions::VisibleOnDifferentViews
#except_on, #hide_on, #only_on, #show_on
Constructor Details
#initialize(name, **args, &block) ⇒ HiddenField
Returns a new instance of HiddenField.
6 7 8 9 10 11 12 13 14 |
# File 'lib/avo/app/fields/hidden_field.rb', line 6 def initialize(name, **args, &block) @defaults = { component: 'hidden-field', } super(name, **args, &block) only_on [:edit, :create] end |