Improve html 5 notice [ci skip]

This commit is contained in:
Carlos Antonio da Silva 2014-10-18 16:32:17 -03:00
parent 9152fee2c8
commit 932619c180
1 changed files with 9 additions and 6 deletions

View File

@ -983,13 +983,16 @@ You can also add `novalidate` to a specific form by setting the option on the fo
<%= simple_form_for(resource, html: { novalidate: true }) do |form| %>
```
Please notice that any of the configurations above will not disable the `placeholder` component,
which is an HTML 5 feature. We believe most of the newest browsers are handling this attribute fine,
and if they aren't, any plugin you use would take of using the placeholder attribute to do it.
However, you can disable it if you want, by removing the placeholder component from the components
list in **Simple Form** configuration file.
Please notice that none of the configurations above will disable the `placeholder` component,
which is an HTML 5 feature. We believe most of the newest browsers are handling this attribute
just fine, and if they aren't, any plugin you use would take care of applying the placeholder.
In any case, you can disable it if you really want to, by removing the placeholder component
from the components list in the **Simple Form** configuration file.
HTML 5 date / time inputs are off by default and will produce select-boxes even if you have HTML 5 turned on in your config file. To force them on in a per-input fashion do:
HTML 5 date / time inputs are not generated by **Simple Form** by default, so using `date`,
`time` or `datetime` will all generate select boxes using normal Rails helpers. We believe
browsers are not totally ready for these yet, but you can easily opt-in on a per-input basis
by passing the html5 option:
```erb
<%= f.input :expires_at, as: :date, html5: true %>