Steps to achieve this Create nt:unstructured node with
sling:resourceType = granite/ui/components/foundation/form/checkboxAdd
defaultChecked property (boolean) trueAdd “uncheckedValue” property.
Assign value to it that which should be saved on the node when checkbox
is not checked.Add “value” property. The value of this property will be
saved on the node when checkbox is selected.example:tried and tested