@@ -9,16 +9,10 @@ good at handling data that's in an integer form. The input ``number`` field
9
9
looks like a text box, except that - if the user's browser supports HTML5
10
10
- it will have some extra front-end functionality.
11
11
12
- This field has different options on how to handle input values that aren't
13
- integers. By default, all non-integer values (e.g. 6.78) will round down
14
- (e.g. 6).
15
-
16
12
+-------------+-----------------------------------------------------------------------+
17
13
| Rendered as | ``input `` ``number `` field |
18
14
+-------------+-----------------------------------------------------------------------+
19
15
| Options | - `grouping `_ |
20
- | | - `scale `_ |
21
- | | - `rounding_mode `_ |
22
16
+-------------+-----------------------------------------------------------------------+
23
17
| Overridden | - `compound `_ |
24
18
| options | |
@@ -47,37 +41,6 @@ Field Options
47
41
48
42
.. include :: /reference/forms/types/options/grouping.rst.inc
49
43
50
- .. include :: /reference/forms/types/options/scale.rst.inc
51
-
52
- rounding_mode
53
- ~~~~~~~~~~~~~
54
-
55
- **type **: ``integer `` **default **: ``IntegerToLocalizedStringTransformer::ROUND_DOWN ``
56
-
57
- By default, if the user enters a non-integer number, it will be rounded
58
- down. There are several other rounding methods and each is a constant
59
- on the :class: `Symfony\\ Component\\ Form\\ Extension\\ Core\\ DataTransformer\\ IntegerToLocalizedStringTransformer `:
60
-
61
- * ``IntegerToLocalizedStringTransformer::ROUND_DOWN `` Round towards zero.
62
-
63
- * ``IntegerToLocalizedStringTransformer::ROUND_FLOOR `` Round towards negative
64
- infinity.
65
-
66
- * ``IntegerToLocalizedStringTransformer::ROUND_UP `` Round away from zero.
67
-
68
- * ``IntegerToLocalizedStringTransformer::ROUND_CEILING `` Round towards
69
- positive infinity.
70
-
71
- * ``IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN `` Round towards the
72
- "nearest neighbor". If both neighbors are equidistant, round down.
73
-
74
- * ``IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN `` Round towards the
75
- "nearest neighbor". If both neighbors are equidistant, round towards the
76
- even neighbor.
77
-
78
- * ``IntegerToLocalizedStringTransformer::ROUND_HALF_UP `` Round towards the
79
- "nearest neighbor". If both neighbors are equidistant, round up.
80
-
81
44
Overridden Options
82
45
------------------
83
46
0 commit comments