checkbox
This component represents a checkbox that can take two values.
Configuration
For general configuration options, see General component configuration.
Specific configuration
type("checkbox")-
Type of component.
value(Binding | boolean)-
Value of the checkbox.
General configuration
In addition to the configurations valid for all Configurationsthe following configurations can optionally be set: boxLabel settings, disabled, errorTarget, icon, labels, label Settings, onChange, required.
Example
checkbox.json
{
"$schema": "https://forms.virtimo.net/5.1.0/schema.json",
"metaData": {
"id": 0,
"version": 0
},
"configuration": {},
"components": [
{
"type": "container",
"label": "Checkbox Component Example",
"components": [
{
"type": "checkbox",
"label": "First Checkbox",
"value": "${/data/checkboxes/one}"
},
{
"type": "html",
"value": "First Checkbox is ${/data/checkboxes/one ? 'checked' : 'unchecked'}"
},
{
"type": "checkbox",
"label": "Second Checkbox",
"value": true
}
]
}
],
"state": {
"data": {
"checkboxes": {
"one": true
}
}
}
}
Embedded preview
Keywords: