Skip to content

Commit 655a94b

Browse files
author
apetitpa
committed
add doc for new tel and color types
1 parent d410c46 commit 655a94b

File tree

4 files changed

+126
-0
lines changed

4 files changed

+126
-0
lines changed

reference/forms/types.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Form Types Reference
1919
types/search
2020
types/url
2121
types/range
22+
types/tel
23+
types/color
2224

2325
types/choice
2426
types/entity

reference/forms/types/color.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
.. index::
2+
single: Forms; Fields; ColorType
3+
4+
ColorType Field
5+
===============
6+
7+
The ``ColorType`` field is a text field that is rendered using the HTML5
8+
``<input type="color">`` tag.
9+
10+
+-------------+---------------------------------------------------------------------+
11+
| Rendered as | ``input`` ``color`` field (a text box) |
12+
+-------------+---------------------------------------------------------------------+
13+
| Inherited | - `data`_ |
14+
| options | - `disabled`_ |
15+
| | - `empty_data`_ |
16+
| | - `error_bubbling`_ |
17+
| | - `error_mapping`_ |
18+
| | - `label`_ |
19+
| | - `label_attr`_ |
20+
| | - `label_format`_ |
21+
| | - `mapped`_ |
22+
| | - `required`_ |
23+
| | - `trim`_ |
24+
+-------------+---------------------------------------------------------------------+
25+
| Parent type | :doc:`TextType </reference/forms/types/text>` |
26+
+-------------+---------------------------------------------------------------------+
27+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ColorType` |
28+
+-------------+---------------------------------------------------------------------+
29+
30+
Inherited Options
31+
-----------------
32+
33+
These options inherit from the :doc:`FormType </reference/forms/types/form>`:
34+
35+
.. include:: /reference/forms/types/options/data.rst.inc
36+
37+
.. include:: /reference/forms/types/options/disabled.rst.inc
38+
39+
.. include:: /reference/forms/types/options/empty_data.rst.inc
40+
:end-before: DEFAULT_PLACEHOLDER
41+
42+
The default value is ``''`` (the empty string).
43+
44+
.. include:: /reference/forms/types/options/empty_data.rst.inc
45+
:start-after: DEFAULT_PLACEHOLDER
46+
47+
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
48+
49+
.. include:: /reference/forms/types/options/error_mapping.rst.inc
50+
51+
.. include:: /reference/forms/types/options/label.rst.inc
52+
53+
.. include:: /reference/forms/types/options/label_attr.rst.inc
54+
55+
.. include:: /reference/forms/types/options/label_format.rst.inc
56+
57+
.. include:: /reference/forms/types/options/mapped.rst.inc
58+
59+
.. include:: /reference/forms/types/options/required.rst.inc
60+
61+
.. include:: /reference/forms/types/options/trim.rst.inc

reference/forms/types/map.rst.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Text Fields
1212
* :doc:`SearchType </reference/forms/types/search>`
1313
* :doc:`UrlType </reference/forms/types/url>`
1414
* :doc:`RangeType </reference/forms/types/range>`
15+
* :doc:`TelType </reference/forms/types/tel>`
16+
* :doc:`ColorType </reference/forms/types/color>`
1517

1618
Choice Fields
1719
~~~~~~~~~~~~~

reference/forms/types/tel.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
.. index::
2+
single: Forms; Fields; TelType
3+
4+
TelType Field
5+
===============
6+
7+
The ``TelType`` field is a text field that is rendered using the HTML5
8+
``<input type="tel">`` tag.
9+
10+
+-------------+---------------------------------------------------------------------+
11+
| Rendered as | ``input`` ``tel`` field (a text box) |
12+
+-------------+---------------------------------------------------------------------+
13+
| Inherited | - `data`_ |
14+
| options | - `disabled`_ |
15+
| | - `empty_data`_ |
16+
| | - `error_bubbling`_ |
17+
| | - `error_mapping`_ |
18+
| | - `label`_ |
19+
| | - `label_attr`_ |
20+
| | - `label_format`_ |
21+
| | - `mapped`_ |
22+
| | - `required`_ |
23+
| | - `trim`_ |
24+
+-------------+---------------------------------------------------------------------+
25+
| Parent type | :doc:`TextType </reference/forms/types/text>` |
26+
+-------------+---------------------------------------------------------------------+
27+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\TelType` |
28+
+-------------+---------------------------------------------------------------------+
29+
30+
Inherited Options
31+
-----------------
32+
33+
These options inherit from the :doc:`FormType </reference/forms/types/form>`:
34+
35+
.. include:: /reference/forms/types/options/data.rst.inc
36+
37+
.. include:: /reference/forms/types/options/disabled.rst.inc
38+
39+
.. include:: /reference/forms/types/options/empty_data.rst.inc
40+
:end-before: DEFAULT_PLACEHOLDER
41+
42+
The default value is ``''`` (the empty string).
43+
44+
.. include:: /reference/forms/types/options/empty_data.rst.inc
45+
:start-after: DEFAULT_PLACEHOLDER
46+
47+
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
48+
49+
.. include:: /reference/forms/types/options/error_mapping.rst.inc
50+
51+
.. include:: /reference/forms/types/options/label.rst.inc
52+
53+
.. include:: /reference/forms/types/options/label_attr.rst.inc
54+
55+
.. include:: /reference/forms/types/options/label_format.rst.inc
56+
57+
.. include:: /reference/forms/types/options/mapped.rst.inc
58+
59+
.. include:: /reference/forms/types/options/required.rst.inc
60+
61+
.. include:: /reference/forms/types/options/trim.rst.inc

0 commit comments

Comments
 (0)