url_field_tag(name, value = nil, options = {}) public

Creates a text field of type “url”.

Options

Examples

url_field_tag 'name'
# => <input id="name" name="name" type="url" />

url_field_tag 'url', 'http://rubyonrails.org'
# => <input id="url" name="url" type="url" value="http://rubyonrails.org" />

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

url_field_tag 'url', 'http://rubyonrails.org', class: 'special_input', disabled: true
# => <input disabled="disabled" class="special_input" id="url" name="url" type="url" value="http://rubyonrails.org" />
Show source
Register or log in to add new notes.