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
  • 16271 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
January 5, 2020
It worked for "granite/ui/components/foundation/form/checkbox" but not with "granite/ui/components/coral/foundation/form/checkbox"