Skip to content
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
15 changes: 13 additions & 2 deletions reference/forms/types/checkbox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`_ |
Expand Down Expand Up @@ -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
Expand Down