Hello,
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.
Any suggestions?
Thanks in advance.
-Anuj Varshney
any suggestion, i have same situation ?
Views
Replies
Total Likes
@kautuk_sahni I am also facing this issue, please let us know if it's feasible to preselect checkbox in page properties or not?
Views
Replies
Total Likes
I found this solution Touch UI Checkbox selected by default – AEM Concepts | AEM Tutorial | AEMaaCS.
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"/>
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies