Skip to main content
Version: v1

Toggle

The toggle input is used to choose one of two values.

The inputType and validationType should be defined as boolean.

{
// Other field properties
"inputType": "boolean",
"validationType": "boolean"
}

Toggle​

<re-form-generator
schema='[{
"type": "toggle",
"id": "toggle-input",
"inputType": "boolean",
"inputName": "is-on",
"visible": true,
"label": "Do you want subscribe?",
"model": "isOn",
"validationType": "boolean",
"defaultValue": true,
"attributes": {
"value": true
}
}]'>
</re-form-generator>