Skip to content
Simone Montali edited this page Sep 9, 2019 · 2 revisions

Switch

{
  "id": "switch",
  "type": "switch",
  "size": "half",
  "label": "label",
  "description": "description",
}

The switch allows the user to toggle between an "OFF" state and an "ON" state. It can be used to store boolean values.

Options

For the general settings fields, check the getting started page.

Please note that setting this field to required will require it to be true. You can use it for agreements or confirmations.

Custom options

The switch field has no additional options.

Filters

You can filter the field's fetched value by calling WordPress' add_filter with the tag "aeria_get_switch".

Clone this wiki locally