Skip to content

Type – Switch

Henner R Setyono edited this page Mar 11, 2020 · 4 revisions

Add an ON / OFF toggle.

'open_in_new_tab' => [
  'label' => __( 'Open in New Tab?' ),
  'type' => 'ct-switch',
]

NOTE

Usually used in conjunction with Conditional Options.

custy_rand_id() => [
  'condition' => [ 'open_in_new_tab' => 'yes' ],
  'options' => [
    'option1' => [ ... ],
    'option2' => [ ... ],
  ]
],

Value Format

Either yes or no.

'open_in_new_tab' => 'yes'