Labeled toggle checkbox
The checkbox type with the renderType checkboxLabeledToggle is displayed as a toggle switch where both states can be labelled (ON / OFF, Visible / Hidden or alike).
Its state can be inverted via invertStateDisplay
Examples
Single checkbox with labeled toggle
[
'columns' => [
'checkbox_19' => [
'label' => 'checkbox_19',
'description' => 'renderType=checkboxLabeledToggle single',
'config' => [
'type' => 'check',
'renderType' => 'checkboxLabeledToggle',
'items' => [
[
'label' => 'foo',
'labelChecked' => 'Enabled',
'labelUnchecked' => 'Disabled',
],
],
],
],
],
]
Copied!
Single checkbox with labeled toggle inverted state display
[
'columns' => [
'checkbox_21' => [
'label' => 'checkbox_21',
'description' => 'renderType=checkboxLabeledToggle single inverted state display',
'config' => [
'type' => 'check',
'renderType' => 'checkboxLabeledToggle',
'items' => [
[
'label' => 'foo',
'labelChecked' => 'Enabled',
'labelUnchecked' => 'Disabled',
'invertStateDisplay' => true,
],
],
],
],
],
]
Copied!