Improve html 5 notice [ci skip]
This commit is contained in:
parent
9152fee2c8
commit
932619c180
15
README.md
15
README.md
|
@ -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| %>
|
<%= simple_form_for(resource, html: { novalidate: true }) do |form| %>
|
||||||
```
|
```
|
||||||
|
|
||||||
Please notice that any of the configurations above will not disable the `placeholder` component,
|
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 fine,
|
which is an HTML 5 feature. We believe most of the newest browsers are handling this attribute
|
||||||
and if they aren't, any plugin you use would take of using the placeholder attribute to do it.
|
just fine, and if they aren't, any plugin you use would take care of applying the placeholder.
|
||||||
However, you can disable it if you want, by removing the placeholder component from the components
|
In any case, you can disable it if you really want to, by removing the placeholder component
|
||||||
list in **Simple Form** configuration file.
|
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
|
```erb
|
||||||
<%= f.input :expires_at, as: :date, html5: true %>
|
<%= f.input :expires_at, as: :date, html5: true %>
|
||||||
|
|
Loading…
Reference in New Issue