File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ how the input and output of the data is handled.
17
17
| Options | - `currency `_ |
18
18
| | - `divisor `_ |
19
19
| | - `grouping `_ |
20
+ | | - `html5 `_ |
20
21
| | - `rounding_mode `_ |
21
22
| | - `scale `_ |
22
23
+-------------+---------------------------------------------------------------------+
@@ -90,6 +91,21 @@ be set back on your object.
90
91
91
92
.. include :: /reference/forms/types/options/rounding_mode.rst.inc
92
93
94
+ html5
95
+ ~~~~~
96
+
97
+ **type **: ``boolean `` **default **: ``false ``
98
+
99
+ .. versionadded :: 5.2
100
+
101
+ This option was introduced in Symfony 5.2.
102
+
103
+ If set to true, the HTML input will be rendered as a native HTML5 type="number" form.
104
+
105
+ .. caution ::
106
+
107
+ As HTML5 number format is normalized, it is incompatible with ``grouping `` option.
108
+
93
109
scale
94
110
~~~~~
95
111
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ the input.
15
15
+-------------+-----------------------------------------------------------------------+
16
16
| Rendered as | ``input `` ``text `` field |
17
17
+-------------+-----------------------------------------------------------------------+
18
- | Options | - `rounding_mode `_ |
18
+ | Options | - `html5 `_ |
19
+ | | - `rounding_mode `_ |
19
20
| | - `scale `_ |
20
21
| | - `symbol `_ |
21
22
| | - `type `_ |
@@ -57,6 +58,17 @@ Field Options
57
58
58
59
The ``rounding_mode `` option was introduced in Symfony 5.1.
59
60
61
+ html5
62
+ ~~~~~
63
+
64
+ **type **: ``boolean `` **default **: ``false ``
65
+
66
+ .. versionadded :: 5.2
67
+
68
+ This option was introduced in Symfony 5.2.
69
+
70
+ If set to true, the HTML input will be rendered as a native HTML5 type="number" form.
71
+
60
72
scale
61
73
~~~~~
62
74
You can’t perform that action at this time.
0 commit comments