Class: Ariadne::Forms::Dsl::HiddenInput
- Defined in:
- lib/ariadne/forms/dsl/hidden_input.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Input
Input::DEFAULT_SIZE, Input::SIZE_MAPPINGS, Input::SIZE_OPTIONS, Input::SPACE_DELIMITED_ARIA_ATTRIBUTES
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Input
#base_id, #builder, #caption, #form, #form_control, #ids, #input_attributes, #label_attributes, #validation_message
Instance Method Summary collapse
-
#initialize(name:, value:, **options) ⇒ HiddenInput
constructor
A new instance of HiddenInput.
- #supports_validation? ⇒ Boolean
- #to_component ⇒ Object
-
#type ⇒ Object
:nocov:.
Methods inherited from Input
#add_input_aria, #add_input_classes, #add_input_data, #autofocus!, #caption?, #caption_id, #caption_template?, #disabled?, #focusable?, #hidden?, #id, #input?, #invalid?, #label, #merge_input_attributes!, #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
Methods included from ClassNameHelper
Constructor Details
#initialize(name:, value:, **options) ⇒ HiddenInput
Returns a new instance of HiddenInput.
10 11 12 13 14 |
# File 'lib/ariadne/forms/dsl/hidden_input.rb', line 10 def initialize(name:, value:, **) @name = name @value = value super(**) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/ariadne/forms/dsl/hidden_input.rb', line 8 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
8 9 10 |
# File 'lib/ariadne/forms/dsl/hidden_input.rb', line 8 def value @value end |
Instance Method Details
#supports_validation? ⇒ Boolean
26 27 28 |
# File 'lib/ariadne/forms/dsl/hidden_input.rb', line 26 def supports_validation? false end |
#to_component ⇒ Object
16 17 18 19 |
# File 'lib/ariadne/forms/dsl/hidden_input.rb', line 16 def to_component html_attrs = @input_attributes || {} Ariadne::Form::HiddenField::Component.new(name:, value:, html_attrs: html_attrs) end |
#type ⇒ Object
:nocov:
22 23 24 |
# File 'lib/ariadne/forms/dsl/hidden_input.rb', line 22 def type :hidden end |