Motion::HTML::InputHelpers
Constants
Instance methods
Similar to color_input; this allows for Boolean attributes
through attrs.
color_input(attribute, attrs: [:required])
# => <input type="color" id="param_key_attribute_name" name="param_key:attribute_name" value="" required />
Returns a color input field.
color_input(attribute)
# => <input type="color" id="param_key_attribute_name" name="param_key:attribute_name" value="" />
Similar to email_input; this allows for Boolean attributes
through attrs.
email_input(attribute, attrs: [:required])
# => <input type="email" id="param_key_attribute_name" name="param_key:attribute_name" value="" required />
Returns a email input field.
email_input(attribute)
# => <input type="email" id="param_key_attribute_name" name="param_key:attribute_name" value="" />
Similar to file_input; this allows for Boolean attributes
through attrs.
file_input(attribute, attrs: [:required])
# => <input type="file" id="param_key_attribute_name" name="param_key:attribute_name" value="" required />
Returns a file input field.
file_input(attribute)
# => <input type="file" id="param_key_attribute_name" name="param_key:attribute_name" value="" />
Similar to number_input; this allows for Boolean attributes
through attrs.
number_input(attribute, attrs: [:required])
# => <input type="number" id="param_key_attribute_name" name="param_key:attribute_name" value="" required />
Returns a number input field.
number_input(attribute)
# => <input type="number" id="param_key_attribute_name" name="param_key:attribute_name" value="" />
Similar to radio; this allows for Boolean attributes through attrs.
radio(attribute, "checked_value", attrs: [:required])
# => <input type="radio" id="param_key_attribute_name_checked_value" name="param_key:attribute_name" value="checked_value" checked="true" required />
Returns a radio input field.
radio(attribute, "checked_value")
# => <input type="radio" id="param_key_attribute_name_checked_value" name="param_key:attribute_name" value="checked_value" checked="true">
Similar to range_input; this allows for Boolean attributes
through attrs.
range_input(attribute, attrs: [:required])
# => <input type="range" id="param_key_attribute_name" name="param_key:attribute_name" value="" required />
Returns a range input field.
range_input(attribute)
# => <input type="range" id="param_key_attribute_name" name="param_key:attribute_name" value="" />
Similar to search_input; this allows for Boolean attributes
through attrs.
search_input(attribute, attrs: [:required])
# => <input type="search" id="param_key_attribute_name" name="param_key:attribute_name" value="" required />
Returns a search input field.
search_input(attribute)
# => <input type="search" id="param_key_attribute_name" name="param_key:attribute_name" value="" />
Similar to text_input; this allows for Boolean attributes
through attrs.
text_input(attribute, attrs: [:required])
# => <input type="text" id="param_key_attribute_name" name="param_key:attribute_name" value="" required />
Returns a text input field.
text_input(attribute)
# => <input type="text" id="param_key_attribute_name" name="param_key:attribute_name" value="" />
Similar to textarea; this allows for Boolean attributes
through attrs.
textarea(attribute, attrs: [:required])
# => <textarea id="param_key_attribute_name" name="param_key:attribute_name" required></textarea>
Returns a textarea field.
textarea(attribute)
# => <textarea id="param_key_attribute_name" name="param_key:attribute_name"></textarea>
Similar to url_input; this allows for Boolean attributes
through attrs.
url_input(attribute, attrs: [:required])
# => <input type="url" id="param_key_attribute_name" name="param_key:attribute_name" value="" required />
Returns a url input field.
url_input(attribute)
# => <input type="url" id="param_key_attribute_name" name="param_key:attribute_name" value="" />