Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 339848a

Browse filesBrowse files
committed
minor #11078 Docs for PercentType disable/customize percent character (OskarStark)
This PR was merged into the master branch. Discussion ---------- Docs for PercentType disable/customize percent character Docs for symfony/symfony#30433 Closes #10464 Commits ------- 16b2e4b Docs for PercentType disable/customize percent character
2 parents ff52d98 + 16b2e4b commit 339848a
Copy full SHA for 339848a

File tree

1 file changed

+17
-1
lines changed
Filter options

1 file changed

+17
-1
lines changed

‎reference/forms/types/percent.rst

Copy file name to clipboardExpand all lines: reference/forms/types/percent.rst
+17-1Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ percentage data. If your percentage data is stored as a decimal (e.g. ``0.95``),
99
you can use this field out-of-the-box. If you store your data as a number
1010
(e.g. ``95``), you should set the ``type`` option to ``integer``.
1111

12-
This field adds a percentage sign "``%``" after the input box.
12+
When ``symbol`` is true, the field will add a percentage sign "``%``" after the
13+
input.
1314

1415
+-------------+-----------------------------------------------------------------------+
1516
| Rendered as | ``input`` ``text`` field |
1617
+-------------+-----------------------------------------------------------------------+
1718
| Options | - `scale`_ |
19+
| | - `symbol`_ |
1820
| | - `type`_ |
1921
+-------------+-----------------------------------------------------------------------+
2022
| Overridden | - `compound`_ |
@@ -54,6 +56,20 @@ scale
5456
By default, the input numbers are rounded. To allow for more decimal places,
5557
use this option.
5658

59+
symbol
60+
~~~~~~
61+
62+
**type**: ``boolean`` or ``string`` **default**: ``true``
63+
64+
.. versionadded:: 4.3
65+
66+
The ``symbol`` option was introduced in Symfony 4.3.
67+
68+
By default, fields are rendered with a percentage sign ``%`` after the input.
69+
Setting the value to ``false`` will not display the percentage sign.
70+
Setting the value to a ``string`` (e.g. ````), will show the string value instead
71+
of the default ``%`` sign.
72+
5773
type
5874
~~~~
5975

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.