From 22069f4523dfa9ed682e4e0367aeabd3fe268d32 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Tue, 18 Nov 2014 19:32:13 +0100 Subject: [PATCH 1/3] Documented html5 option --- reference/forms/types/date.rst | 3 +++ reference/forms/types/datetime.rst | 3 +++ reference/forms/types/options/html5.rst.inc | 13 +++++++++++++ reference/forms/types/time.rst | 3 +++ 4 files changed, 22 insertions(+) create mode 100644 reference/forms/types/options/html5.rst.inc diff --git a/reference/forms/types/date.rst b/reference/forms/types/date.rst index 994ff6156b3..0ac6b5496e5 100644 --- a/reference/forms/types/date.rst +++ b/reference/forms/types/date.rst @@ -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`_ | @@ -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 diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index fc58493207f..a51f666e176 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -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`_ | @@ -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 ~~~~~ diff --git a/reference/forms/types/options/html5.rst.inc b/reference/forms/types/options/html5.rst.inc new file mode 100644 index 00000000000..fc2ad0f57be --- /dev/null +++ b/reference/forms/types/options/html5.rst.inc @@ -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 +often require a text type instead of a HTML5 type. diff --git a/reference/forms/types/time.rst b/reference/forms/types/time.rst index 71b3af1cdb5..0221cf8d54e 100644 --- a/reference/forms/types/time.rst +++ b/reference/forms/types/time.rst @@ -17,6 +17,7 @@ as a ``DateTime`` object, a string, a timestamp or an array. +----------------------+-----------------------------------------------------------------------------+ | Options | - `empty_value`_ | | | - `hours`_ | +| | - `html5`_ | | | - `input`_ | | | - `minutes`_ | | | - `model_timezone`_ | @@ -81,6 +82,8 @@ Field Options .. include:: /reference/forms/types/options/hours.rst.inc +.. include:: /reference/forms/types/options/html5.rst.inc + input ~~~~~ From 238beefd6f4fd215d4d515024520f33416e3f5bf Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sun, 23 Nov 2014 21:32:57 +0100 Subject: [PATCH 2/3] Typo fix --- reference/forms/types/options/html5.rst.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/options/html5.rst.inc b/reference/forms/types/options/html5.rst.inc index fc2ad0f57be..6a146e79eb1 100644 --- a/reference/forms/types/options/html5.rst.inc +++ b/reference/forms/types/options/html5.rst.inc @@ -9,5 +9,5 @@ html5 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 -often require a text type instead of a HTML5 type. +This is useful when you want to use a custom JavaScript datapicker, which +often requires a text type instead of a HTML5 type. From d08925eb2152d02b9b17397174dd27c4a7de7a8c Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sun, 23 Nov 2014 22:11:06 +0100 Subject: [PATCH 3/3] Yet another typo fix --- reference/forms/types/options/html5.rst.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/forms/types/options/html5.rst.inc b/reference/forms/types/options/html5.rst.inc index 6a146e79eb1..1022412f3b3 100644 --- a/reference/forms/types/options/html5.rst.inc +++ b/reference/forms/types/options/html5.rst.inc @@ -10,4 +10,4 @@ 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 useful when you want to use a custom JavaScript datapicker, which -often requires a text type instead of a HTML5 type. +often requires a text type instead of an HTML5 type.