Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit16b2e4b

Browse files
committed
Docs for PercentType disable/customize percent character
1 parent1bfe282 commit16b2e4b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

‎reference/forms/types/percent.rst‎

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp