@@ -6,12 +6,16 @@ CheckboxType Field
6
6
7
7
Creates a single input checkbox. This should always be used for a field
8
8
that has a boolean value: if the box is checked, the field will be set to
9
- true, if the box is unchecked, the value will be set to false.
9
+ true, if the box is unchecked, the value will be set to false. Optionally
10
+ you can specify an array of values that, if submitted, will be evaluated
11
+ to "false" as well (this differs from what HTTP defines, but can be handy
12
+ if you want to handle submitted values like "0" or "false").
10
13
11
14
+-------------+------------------------------------------------------------------------+
12
15
| Rendered as | ``input `` ``checkbox `` field |
13
16
+-------------+------------------------------------------------------------------------+
14
- | Options | - `value `_ |
17
+ | Options | - `false_values `_ |
18
+ | | - `value `_ |
15
19
+-------------+------------------------------------------------------------------------+
16
20
| Overridden | - `compound `_ |
17
21
| options | - `empty_data `_ |
@@ -48,6 +52,13 @@ Example Usage
48
52
Field Options
49
53
-------------
50
54
55
+ false_values
56
+ ~~~~~~~~~~~~
57
+
58
+ **type **: ``array `` **default **: ``array(null) ``
59
+
60
+ An array of values to be interpreted as ``false ``.
61
+
51
62
.. include :: /reference/forms/types/options/value.rst.inc
52
63
53
64
Overridden Options
0 commit comments