How do we set a default value for the "granite/ui/components/foundation/form/checkbox" in page properties? I've set the value as true but when I open a dialog first time its always un-selected.
Tried using cq:template to set the value but that also didn't set the default value.
You have to use the defaultChecked attribute. Tried many other solutions but this is the only one that worked. If you're not seeing the change, re-create the page or use a component to test with.
<showPhotos jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/checkbox" text="Open link in new tab" name="./newTab" value="true" defaultChecked="{Boolean}true" uncheckedValue="{Boolean}false" checked="{Boolean}true"/>