This is a switch/toogle input field for any values. It can toggle true/false, yes/no, on/off values.
Property
Default
Accepted values
Description
textOn
none
String
Visible label if the switch state is on
textOff
Visible label if the switch state is off
valueOn
any primitives or Object
Object
Value if the switch state is on
valueOff
Value if the switch state is off
Simple example with active/inactive labels
{ type: "switch", label: "Status (switch field)", model: "status", textOn: "Active", textOff: "Inactive" }
Example with male/female model values
Last updated 7 years ago
Was this helpful?
{ type: "switch", label: "Sex", model: "sex", textOn: "Female", textOff: "Male", valueOn: "female", valueOff: "male" }