diff --git a/reference/forms/types/integer.rst b/reference/forms/types/integer.rst index 70c2e1561fa..9d7bc9747c4 100644 --- a/reference/forms/types/integer.rst +++ b/reference/forms/types/integer.rst @@ -17,11 +17,10 @@ integers. By default, all non-integer values (e.g. 6.78) will round down | Rendered as | ``input`` ``number`` field | +-------------+-----------------------------------------------------------------------+ | Options | - `grouping`_ | -| | - `scale`_ | | | - `rounding_mode`_ | +-------------+-----------------------------------------------------------------------+ | Overridden | - `compound`_ | -| options | | +| options | - `scale`_ | +-------------+-----------------------------------------------------------------------+ | Inherited | - `data`_ | | options | - `disabled`_ | @@ -47,8 +46,6 @@ Field Options .. include:: /reference/forms/types/options/grouping.rst.inc -.. include:: /reference/forms/types/options/scale.rst.inc - rounding_mode ~~~~~~~~~~~~~ @@ -83,6 +80,13 @@ Overridden Options .. include:: /reference/forms/types/options/compound_type.rst.inc +scale +~~~~~ + +**type**: ``integer`` **default**: ``0`` + +This specifies how many decimals will be allowed until the field rounds the submitted value (via ``rounding_mode``). This option inherits from :doc:`number ` type and is overriden to ``0`` for ``IntegerType``. + Inherited Options ----------------- diff --git a/reference/forms/types/number.rst b/reference/forms/types/number.rst index e85f60743c2..aabaf2a9c09 100644 --- a/reference/forms/types/number.rst +++ b/reference/forms/types/number.rst @@ -42,7 +42,19 @@ Field Options .. include:: /reference/forms/types/options/grouping.rst.inc -.. include:: /reference/forms/types/options/scale.rst.inc +scale +~~~~~ + +.. versionadded:: 2.7 + The ``scale`` option was introduced in Symfony 2.7. Prior to Symfony 2.7, + it was known as ``precision``. + +**type**: ``integer`` **default**: Locale-specific (usually around ``3``) + +This specifies how many decimals will be allowed until the field rounds +the submitted value (via ``rounding_mode``). For example, if ``scale`` is set +to ``2``, a submitted value of ``20.123`` will be rounded to, for example, +``20.12`` (depending on your `rounding_mode`_). rounding_mode ~~~~~~~~~~~~~ diff --git a/reference/forms/types/options/scale.rst.inc b/reference/forms/types/options/scale.rst.inc deleted file mode 100644 index 82df7d60d3c..00000000000 --- a/reference/forms/types/options/scale.rst.inc +++ /dev/null @@ -1,13 +0,0 @@ -scale -~~~~~ - -.. versionadded:: 2.7 - The ``scale`` option was introduced in Symfony 2.7. Prior to Symfony 2.7, - it was known as ``precision``. - -**type**: ``integer`` **default**: Locale-specific (usually around ``3``) - -This specifies how many decimals will be allowed until the field rounds -the submitted value (via ``rounding_mode``). For example, if ``scale`` is set -to ``2``, a submitted value of ``20.123`` will be rounded to, for example, -``20.12`` (depending on your `rounding_mode`_).