Hi, as the title suggests I'm trying to make one of my fields/container hide when checkbox is true/checked & using ACS commons for this purpose.
Even after following each step the show-hide checkbox functionality isn't working for me. I'm attaching the screen shots of my fields here. Please tell me what am I missing or if changes are required.
I want to hide checkbox-container which contains one text field based on classbox (its my check box).
Its most likely there's mistake from my side but I couldn't figure it.
I request for you guidance.
Solved! Go to Solution.
The checkbox show/hide functionality does not support boolean values. You might consider to use string values for the checkbox's checked (and unchecked) status. Also, remember to set the value "cq-dialog-checkbox-showhide" for the "granite:class" attribute.
<customClass jcr:primaryType="nt:unstructured" granite:class="cq-dialog-checkbox-showhide" <!-- Add --> sling:resourceType="granite/ui/components/coral/foundation/form/checkbox" name="./customClass" text="Add Custom Class?" value="enable"/> <!-- Update -->
Thanks for your prompt reply. I tried the changes which you suggested but no success.
As @sherinregi suggested, it was single (.) causing the issue. After removing it, field was working as expected. But next problem is in multifield.
When I add these fields in multifield, the single checkbox is affecting all the fields to show/hide. Tried this but didn't worked.