Coral-checkbox default checked option | Community
Skip to main content
Level 2
January 3, 2020
Solved

Coral-checkbox default checked option

  • January 3, 2020
  • 2 replies
  • 16282 views

Default checked state is not appearing for coral checkboxes

"granite/ui/components/coral/foundation/form/checkbox"

but it's working fine for granite foundation one. i.e. granite/ui/components/foundation/form/checkbox.

 

I've tried many ways (e.g. checked (string) property setting as true, defaultChecked / uncheckedValue etc.) but nothing is working. One thing noticed that, "checked" property has type  ' booleanel ' while in JCR, only boolean is available;not the expression lang type. So,is it causing any issue?

 

 

Any pointers on this will be really helpful.

Best answer by arunpatidar

Hi,

Just use the below value to mark the checkbox prechecked.

checked(Boolean)=true

2 replies

Adobe Employee
January 3, 2020

I think it is boolean, not booleanel. 

Have you tried:

uncheckedValue="{Boolean}false"

defaultChecked="{Boolean}true" 

Cheers,

Vishu

 

Level 2
January 4, 2020

Yes. tried that one too. But didn't work out. Also, it is booleanel for coral ; same thing is boolean for non-coral foundation. link s shared above.

Thanks

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
January 5, 2020

Hi,

Just use the below value to mark the checkbox prechecked.

checked(Boolean)=true

Arun Patidar
Level 2
March 24, 2025

Hi @arunpatidar 

I currently use AEM as a cloud service, but it is not functioning as expected. Could you please advise if there is an alternative property available for this prechecked checkbox?

Thank you for your assistance.

Best regards,
Keerthana

 

Mohit_Singh_01
Level 2
February 20, 2026

@arunpatidar I’m getting the same issue.
It worked for "granite/ui/components/foundation/form/checkbox" but not with "granite/ui/components/coral/foundation/form/checkbox".

As I want to add in the page component. So that it always bydefault true whenever author open the page properties.