HTML5 is becoming more popular, and there's already some benefit in
using HTML5 in browsers that support it, like MobileSafari, Safari,
and Opera.

I've created a patch (with tests) that adds the following input tag
helpers:

- email_field_tag (and email_field)
- url_field_tag (etc.)
- telephone_field_tag (aliased to phone_field_tag)
- number_field_tag
- range_field_tag
- search_field_tag

The ticket/patch is available here:

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3646-html5-form-field-helpers-email_field_tag-etc

Some may feel that something like "text_field_tag 'email', nil, :type
=> 'email'" is good enough, but this doesn't work for "text_field"
because any "type" option is overridden to "text" (this could be fixed
with a smaller patch).

I do think, though, that providing helper methods like
"email_field_tag" will encourage wider adoption of HTML5, and that's a
good thing for everyone.

Stephen

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.


Reply via email to