This documentation is for a version that has reached its End Of Life. Such versions are no longer supported and don't receive security updates. Consider updating to a newer version.
Checkbox field type¶
The Checkbox field type stores the current status for a checkbox input, checked or unchecked, by storing a boolean value.
Name | Internal name | Expected input type |
---|---|---|
Checkbox |
ezboolean |
boolean |
PHP API field type¶
Value object¶
Properties¶
The Value class of this field type contains the following properties:
Property | Type | Default value | Description |
---|---|---|---|
$bool |
boolean |
false |
This property is used for the checkbox status, represented by a boolean value. |
1 2 3 4 5 6 7 8 9 10 11 |
|
Constructor¶
The Checkbox\Value
constructor accepts a boolean value:
1 2 3 4 5 |
|
String representation¶
As this field type isn't a string but a boolean, it returns "1" (true) or "0" (false) in cases where it's cast to string, and it's never considered empty.