Skip to content

Documented html5 option #4487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 24, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions reference/forms/types/date.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ day, and year) or three select boxes (see the `widget`_ option).
| Options | - `days`_ |
| | - `empty_value`_ |
| | - `format`_ |
| | - `html5`_ |
| | - `input`_ |
| | - `model_timezone`_ |
| | - `months`_ |
Expand Down Expand Up @@ -105,6 +106,8 @@ Alternatively, you can specify a string to be displayed for the "blank" value::

.. include:: /reference/forms/types/options/date_format.rst.inc

.. include:: /reference/forms/types/options/html5.rst.inc

.. _form-reference-date-input:

.. include:: /reference/forms/types/options/date_input.rst.inc
Expand Down
3 changes: 3 additions & 0 deletions reference/forms/types/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ data can be a ``DateTime`` object, a string, a timestamp or an array.
| | - `empty_value`_ |
| | - `format`_ |
| | - `hours`_ |
| | - `html5`_ |
| | - `input`_ |
| | - `minutes`_ |
| | - `model_timezone`_ |
Expand Down Expand Up @@ -82,6 +83,8 @@ field to be rendered as an ``input`` field with ``type="datetime"``.

.. include:: /reference/forms/types/options/hours.rst.inc

.. include:: /reference/forms/types/options/html5.rst.inc

input
~~~~~

Expand Down
13 changes: 13 additions & 0 deletions reference/forms/types/options/html5.rst.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
html5
~~~~~

.. versionadded:: 2.6
The ``html5`` option was introduced in Symfony 2.6.

**type**: ``boolean`` **default**: ``true``

If this is set to ``true`` (the default), it'll use the HTML5 type (date, time
or datetime) to render the field. When set to ``false``, it'll use the text type.

This is usefull when you want to use a custom JavaScript datapicker, which
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useful

often require a text type instead of a HTML5 type.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requires

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] of an HTML type.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case, I specificly talk about the HTML5 types: date, datetime, time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, I just noticed that my comment was confusing. I tried to point out that we should use "an" instead of "a". The 5 of HTML5 should be kept of course.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, fixed it now

3 changes: 3 additions & 0 deletions reference/forms/types/time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ as a ``DateTime`` object, a string, a timestamp or an array.
+----------------------+-----------------------------------------------------------------------------+
| Options | - `empty_value`_ |
| | - `hours`_ |
| | - `html5`_ |
| | - `input`_ |
| | - `minutes`_ |
| | - `model_timezone`_ |
Expand Down Expand Up @@ -81,6 +82,8 @@ Field Options

.. include:: /reference/forms/types/options/hours.rst.inc

.. include:: /reference/forms/types/options/html5.rst.inc

input
~~~~~

Expand Down