switch

This is a switch/toogle input field for any values. It can toggle true/false, yes/no, on/off values.

Special properties of field

Usage

Simple example with active/inactive labels

{
    type: "switch",
    label: "Status (switch field)",
    model: "status",
    textOn: "Active",
    textOff: "Inactive"
}

Example with male/female model values

{
    type: "switch",
    label: "Sex",
    model: "sex",
    textOn: "Female",
    textOff: "Male",
    valueOn: "female",
    valueOff: "male"
}

Last updated