Checkbox

Show a field of type checkbox.

Interface

interface ICheckboxField extends IBaseField {
  options: ICheckboxOption[];
  value?: string[];
  defaultChecked?: boolean;
}

Example

Checkbox
{
  "name": "addons",
  "type": "Checkbox",
  "label": {
    "t": "forms.addons"
  },
  "description": {
    "t": "forms.addonsDescription"
  },
  "validation": {
    "required": false
  },
  "options": "{togoAddons}"
}

Properties

type

Must be “Checkbox”.

  • Type: "Checkbox"

  • Required: Yes

options

Options to be displayed in the checkbox.

value

Default value of the checkbox.

  • Type: string[]

  • Required: No

defaultChecked

if true, all options selected by default will be displayed

  • Type: boolean

  • Required: No