8000 feature #11314 document the input option of the NumberType (xabbuh) · symfony/symfony-docs@d403f97 · GitHub
[go: up one dir, main page]

Skip to content

Commit d403f97

Browse files
committed
feature #11314 document the input option of the NumberType (xabbuh)
This PR was merged into the master branch. Discussion ---------- document the input option of the NumberType see symfony/symfony#30893 #FOSSHackathons #EUFOSSA Commits ------- c004dc5 document the input option of the NumberType
2 parents 0cba12e + c004dc5 commit d403f97

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

reference/forms/types/number.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ that you want to use for your number.
1313
+-------------+----------------------------------------------------------------------+
1414
| Options | - `grouping`_ |
1515
| | - `html5`_ |
16+
| | - `input`_ |
1617
| | - `scale`_ |
1718
| | - `rounding_mode`_ |
1819
+-------------+----------------------------------------------------------------------+
@@ -59,6 +60,21 @@ html5
5960
If set to ``true``, the HTML input will be rendered as a native HTML5 ``type="number"``
6061
form.
6162

63+
input
64+
~~~~~
65+
66+
**type**: ``string`` **default**: ``number``
67+
68+
.. versionadded:: 4.3
69+
70+
The ``input`` option was introduced in Symfony 4.3.
71+
72+
The format of the input data - i.e. the format that the number is stored on
73+
your underlying object. Valid values are ``number`` and ``string``. Setting
74+
this option to ``string`` can be useful if the underlying data is a string
75+
for precision reasons (for example, Doctrine uses strings for the ``decimal``
76+
type).
77+
6278
scale
6379
~~~~~
6480

0 commit comments

Comments
 (0)
0