CheckboxGroup
This block displays a couple of checkboxes under a label. If set, they will be divided into several columns.
Example
{
type: "checkboxGroup",
label: "Lebensmittelunverträglichkeiten",
name: "Lebensmittelunverträglichkeiten",
helpText: "Bitte wählen Sie alles, was Sie nicht essen mögen oder dürfen.",
columns: 4,
options: [
{
value: 'fish',
label: 'Fisch',
checked: true
},
{
value: 'pork',
label: 'Schwein',
checked: false
},
{
value: 'seafood',
label: 'Meeresfrüchte',
checked: false
},
{
value: 'nuts',
label: 'Nüsse',
checked: false
}
]
}
Reference
columns
How many colums the checkboxes should be divided in visually.
| Type | Required | Default |
|---|---|---|
| number | no | 1 |
options
Options which can be selected by the user.
| Type | Required | Default |
|---|---|---|
| array of options | yes | - |
Type Definitions
Option
An object that identifies the data to be rendered as a checkbox.
Properties
| Name | Type | Description |
|---|---|---|
| value | string or number | Value which will be stored / used within the form |
| label | string | Label which will be displayed in the form. |
| [checked] | boolean | Optionally, defines if checkbox is checked. |