Class: Primer::Forms::Dsl::HiddenInput
- Defined in:
- app/lib/primer/forms/dsl/hidden_input.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Input
Input::DEFAULT_INPUT_WIDTH, Input::DEFAULT_SIZE, Input::INPUT_WIDTH_MAPPINGS, Input::INPUT_WIDTH_OPTIONS, Input::SIZE_MAPPINGS, Input::SIZE_OPTIONS, Input::SPACE_DELIMITED_ARIA_ATTRIBUTES
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Input
#base_id, #builder, #caption, #form, #form_control, #ids, #input_arguments, #label_arguments, #validation_message
Instance Method Summary collapse
- #hidden? ⇒ Boolean
-
#initialize(name:, **system_arguments) ⇒ HiddenInput
constructor
A new instance of HiddenInput.
- #label ⇒ Object
- #supports_validation? ⇒ Boolean
- #to_component ⇒ Object
- #type ⇒ Object
Methods inherited from Input
#add_input_aria, #add_input_classes, #add_input_data, #add_label_classes, #autofocus!, #caption?, #caption_id, #caption_template?, #disabled?, #focusable?, #full_width?, #id, #input?, #input_width, #invalid?, #merge_input_arguments!, #remove_input_data, #render_caption_template, #required?, #size, #valid?, #validation_arguments, #validation_error_icon_target, #validation_id, #validation_message_arguments, #validation_messages, #validation_success_icon_target, #value, #values_disambiguate_template_names?
Methods included from ClassNameHelper
Constructor Details
#initialize(name:, **system_arguments) ⇒ HiddenInput
Returns a new instance of HiddenInput.
10 11 12 13 |
# File 'app/lib/primer/forms/dsl/hidden_input.rb', line 10 def initialize(name:, **system_arguments) @name = name super(**system_arguments) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'app/lib/primer/forms/dsl/hidden_input.rb', line 8 def name @name end |
Instance Method Details
#hidden? ⇒ Boolean
31 32 33 |
# File 'app/lib/primer/forms/dsl/hidden_input.rb', line 31 def hidden? true end |
#label ⇒ Object
19 20 21 |
# File 'app/lib/primer/forms/dsl/hidden_input.rb', line 19 def label nil end |
#supports_validation? ⇒ Boolean
27 28 29 |
# File 'app/lib/primer/forms/dsl/hidden_input.rb', line 27 def supports_validation? false end |
#to_component ⇒ Object
15 16 17 |
# File 'app/lib/primer/forms/dsl/hidden_input.rb', line 15 def to_component HiddenField.new(input: self) end |
#type ⇒ Object
23 24 25 |
# File 'app/lib/primer/forms/dsl/hidden_input.rb', line 23 def type :hidden end |