Checkbox
A checkbox group that allows users to select multiple options from a list.
The Checkbox field renders a group of checkboxes where users can select zero or more options. It is the standard choice when multiple selections are allowed, such as interests, features, or agreement checkboxes.
For the shared properties available on all fields (label, help, note, key, width, visual styling, required), see the Form Fields Overview.
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
| options | Option[] | Two default options | List of selectable options, each with a value and label |
| minSelected | number | -- | Minimum number of options the user must check |
| maxSelected | number | -- | Maximum number of options the user can check |
| orientation | "vertical" or "horizontal" | "vertical" | Stack options vertically or lay them out in a row |
| defaultValues | string[] | -- | Array of option value strings that should be pre-checked |
Option structure
Each option in the options array has the following shape:
| Property | Type | Description |
|---|---|---|
| value | string | The programmatic value stored in submission data |
| label | string | The text displayed to the user |
Validation
The Checkbox field extends InputFieldBase, so the required toggle is available. When required, at least one option must be selected.
The minSelected property provides finer control -- for example, you can require the user to select at least 2 options. The maxSelected property caps how many can be chosen.
Example Usage
An interests survey requiring at least two selections:
{
"type": "checkbox",
"label": "Select your interests",
"required": true,
"minSelected": 2,
"orientation": "vertical",
"options": [
{ "value": "design", "label": "Design" },
{ "value": "engineering", "label": "Engineering" },
{ "value": "marketing", "label": "Marketing" },
{ "value": "sales", "label": "Sales" }
]
}