Class: Glib::JsonUi::ViewBuilder::Fields::Hidden

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

Overview

Hidden input field not visible to users.

Submitted with the form but not displayed. Useful for passing data like IDs, tokens, or state that users shouldn’t see or modify.

Examples:

Hidden field

form.fields_hidden name: 'mode', value: 'dialog'

See Also:

  • Garage example

Instance Attribute Summary

Attributes inherited from JsonUiElement

#json, #page

Instance Method Summary collapse

Methods inherited from AbstractField

#autoValidate, #context, #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

#initialize, #props

Constructor Details

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

Instance Method Details

#createdObject



319
320
321
322
323
324
325
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 319

def created
  # Hidden fields don't need labels or placeholders
  @label = ''
  @placeholder = ''

  super
end