Flowdock
method

color_field_tag

Importance_2
Ruby on Rails latest stable (v4.2.1) - 0 notes - Class: ActionView::Helpers::FormTagHelper
color_field_tag(name, value = nil, options = {}) public

Creates a text field of type “color”.

Options

Examples

color_field_tag 'name'
# => <input id="name" name="name" type="color" />

color_field_tag 'color', '#DEF726'
# => <input id="color" name="color" type="color" value="#DEF726" />

color_field_tag 'color', nil, class: 'special_input'
# => <input class="special_input" id="color" name="color" type="color" />

color_field_tag 'color', '#DEF726', class: 'special_input', disabled: true
# => <input disabled="disabled" class="special_input" id="color" name="color" type="color" value="#DEF726" />
Show source
Register or log in to add new notes.