Switch¶
-
/libs/granite/ui/components/coral/foundation/form/switch A switch component to represent boolean concept (the “On”/”Off” toggle switch).
It extends
Fieldcomponent.It has the following content structure:
-
granite:FormSwitch
- granite:FormField
- namestring
The name that identifies the field when submitting the form.
-
deleteHintboolean
- true
trueto generate the SlingPostServlet @Delete hidden input based on the name.
-
valuestring
- true
The value of the field.
-
uncheckedValuestring
- false
The submit value of the field when it is unchecked.
- disabledboolean
Indicates if the field is in disabled state.
- requiredboolean
Indicates if the field is mandatory to be filled.
- validationstring
- multiple
The name of the validator to be applied. E.g.
foundation.jcr.name. See validation in Granite UI.
- checkedboolean
trueto pre-check this field,falseotherwise.
- ignoreDataboolean
If
false, the checked status is based on matching the form values bynameandvalueproperties. Otherwise, the form values are not matched, and the checked status is based oncheckedproperty specified.
- wrapperClassstring
The class for the wrapper element.
-
granite:FormSwitch