I am using AEM 6.1 SP1. I am trying to develop touch ui for the components. I am facing problem with checkbox in the multifield. The sling:resourceType for checkbox i am using is "granite/ui/components/foundation/form/checkbox", gave value = true.
When i looked in to the page data in CRXDE, the field is saving like this "checkss":["true"],
Always checkbox value is getting saved inside another square bracket. I am not sure how to avoid that. Because of brackets and quotes, even while trying to data-sly-test it is giving me unable to scan input error.
Please reply with thoughts.
To get a checkbox working in a Multifield - you can code against the Granite APIs as we do in this article:
IN this article - we are coding a nested Multi-field:
But instead of a multifield - code a checkbox so it appears in the multi-field dialog.
Here is another artilce that will help you to code with Granite APIs in a Touch UI dialog:
( i cannot find an example of using a checkbox in a MF - however - these two articles should show you how to code with the granite APIs in a touch ui dialog.)
Check these git repo:-
It might help you.
Thanks and Regards