Toggle

Displays a toggle.

Interface

interface IToggleField extends IBaseField {
  checkedText: string | ILocales;
  uncheckedText: string | ILocales;
  value?: boolean;
}

Example

Toggle
{
  "name": "isPublic",
  "type": "Toggle",
  "label": {
    "t": "forms.public"
  },
  "description": {
    "t": "forms.publicDescription"
  },
  "validation": {
    "required": false
  },
  "checkedText": {
    "t": "common.yes"
  },
  "uncheckedText": {
    "t": "common.no"
  },
  "condition": "type.value=TeamSite"
}

Properties

type

Must be “Toggle”.

  • Type: "Toggle"

  • Required: Yes

checkedText

Text that will be displayed when the toggle is checked.

uncheckedText

Text that will be shown when the toggle is not checked.

value

Default value of Toggle.

  • Type: boolean

  • Required: No