Checkboxes
The checkboxes
fieldtype lets you add multiple on-off checkboxes.
my_options:
display: My Options
type: checkboxes
options:
first: The First Thing
second: The Second Thing
third: And Another Thing
This fieldtype will set the field’s value to a list of the checked boxes. If you use a named list of options (like above), the list keys will be saved in the field’s value while the list values will be displayed on the screen in the Control Panel. If you use a simple list of options instead (not named), the list’s values will be used both for storing the field’s value and for on-screen display.
Using the example above, if the first and last boxes were checked, the resulting field would look like this:
my_options:
- first
- third