Skip to content

[Form] Added documentation for "html5" option of MoneyType and PercentType #14295

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 1 commit into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 16 additions & 0 deletions reference/forms/types/money.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ how the input and output of the data is handled.
| Options | - `currency`_ |
| | - `divisor`_ |
| | - `grouping`_ |
| | - `html5`_ |
| | - `rounding_mode`_ |
| | - `scale`_ |
+-------------+---------------------------------------------------------------------+
Expand Down Expand Up @@ -90,6 +91,21 @@ be set back on your object.

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

html5
~~~~~

**type**: ``boolean`` **default**: ``false``

.. versionadded:: 5.2

This option was introduced in Symfony 5.2.

If set to true, the HTML input will be rendered as a native HTML5 type="number" form.

.. caution::

As HTML5 number format is normalized, it is incompatible with ``grouping`` option.

scale
~~~~~

Expand Down
14 changes: 13 additions & 1 deletion reference/forms/types/percent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ the input.
+-------------+-----------------------------------------------------------------------+
| Rendered as | ``input`` ``text`` field |
+-------------+-----------------------------------------------------------------------+
| Options | - `rounding_mode`_ |
| Options | - `html5`_ |
| | - `rounding_mode`_ |
| | - `scale`_ |
| | - `symbol`_ |
| | - `type`_ |
Expand Down Expand Up @@ -57,6 +58,17 @@ Field Options

The ``rounding_mode`` option was introduced in Symfony 5.1.

html5
~~~~~

**type**: ``boolean`` **default**: ``false``

.. versionadded:: 5.2

This option was introduced in Symfony 5.2.

If set to true, the HTML input will be rendered as a native HTML5 type="number" form.

scale
~~~~~

Expand Down