8000 Update percent.rst by ThomasLandauer · Pull Request #10633 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Update percent.rst #10633

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
Nov 5, 2018
Merged
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
8 changes: 4 additions & 4 deletions reference/forms/types/percent.rst
7B53
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PercentType Field
=================

The ``PercentType`` renders an input text field and specializes in handling
percentage data. If your percentage data is stored as a decimal (e.g. ``.95``),
percentage data. If your percentage data is stored as a decimal (e.g. ``0.95``),
you can use this field out-of-the-box. If you store your data as a number
(e.g. ``95``), you should set the ``type`` option to ``integer``.

Expand Down Expand Up @@ -60,14 +60,14 @@ type
**type**: ``string`` **default**: ``fractional``

This controls how your data is stored on your object. For example, a percentage
corresponding to "55%", might be stored as ``.55`` or ``55`` on your
corresponding to "55%", might be stored as ``0.55`` or ``55`` on your
object. The two "types" handle these two cases:

* ``fractional``
If your data is stored as a decimal (e.g. ``.55``), use this type.
If your data is stored as a decimal (e.g. ``0.55``), use this type.
The data will be multiplied by ``100`` before being shown to the
user (e.g. ``55``). The submitted data will be divided by ``100``
on form submit so that the decimal value is stored (``.55``);
on form submit so that the decimal value is stored (``0.55``);

* ``integer``
If your data is stored as an integer (e.g. 55), then use this option.
Expand Down
0