conversionfoundry / breeze

A Ruby on Rails CMS for brochure-style websites.
Other
3 stars 2 forks source link

Use HTML5 form elements #104

Closed isaacfreeman closed 11 years ago

isaacfreeman commented 11 years ago

Wherever relevant, forms should use the new HTML5 input types for numbers, passwords, email addresses, telephone numbers and so forth.

The field types are outlined here - http://www.w3.org/TR/2011/WD-html5-20110525/the-input-element.html

So I think we can use text, tel, email, password, number, checkbox, radio, submit

Telephone doesn't enforce a particular syntax, but email does - A valid e-mail address is a string that matches the ABNF production 1( atext / "." ) "@" ldh-str ( "." ldh-str ) - the email field will allow multiple comma separated email addresses.

We may also want to specify an autocomplete attribute to help people fill the form in (http://www.w3.org/TR/2011/WD-html5-20110525/common-input-element-attributes.html#attr-input-autocomplete) - When an input element's resulting autocompletion state is on, the user agent may store the value entered by the user so that if the user returns to the page, the UA can prefill the form.

It looks like it's supported in Firefox/Safari/Chrome/Android - But opera and IE you have to have the absolute most modern - http://www.wufoo.com/html5/ - The fallback though is simple text, so that's fine.

isaacfreeman commented 11 years ago

Moved to Basecamp as a feature request.