diff --git a/reference/forms/types/checkbox.rst b/reference/forms/types/checkbox.rst index 08c1a6bddd2..1f9e6d7d456 100644 --- a/reference/forms/types/checkbox.rst +++ b/reference/forms/types/checkbox.rst @@ -6,12 +6,16 @@ CheckboxType Field Creates a single input checkbox. This should always be used for a field that has a boolean value: if the box is checked, the field will be set to -true, if the box is unchecked, the value will be set to false. +true, if the box is unchecked, the value will be set to false. Optionally +you can specify an array of values that, if submitted, will be evaluated +to "false" as well (this differs from what HTTP defines, but can be handy +if you want to handle submitted values like "0" or "false"). +-------------+------------------------------------------------------------------------+ | Rendered as | ``input`` ``checkbox`` field | +-------------+------------------------------------------------------------------------+ -| Options | - `value`_ | +| Options | - `false_values`_ | +| | - `value`_ | +-------------+------------------------------------------------------------------------+ | Overridden | - `compound`_ | | options | - `empty_data`_ | @@ -48,6 +52,13 @@ Example Usage Field Options ------------- +false_values +~~~~~~~~~~~~ + +**type**: ``array`` **default**: ``array(null)`` + +An array of values to be interpreted as ``false``. + .. include:: /reference/forms/types/options/value.rst.inc Overridden Options