Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Widget hide and show based on checkbox in dialog


Level 3

I have a implementation in which my radio button group has to be shown and hide based on checkbox. I have gone through the api but i couldn't find. Can anyone please help me on this. Thanks in advance.

1 Reply



Option 1: This should be of some help to you:


//The show hide functionality is handle by /libs/cq/gui/components/authoring/dialog/dropdownshowhide/clientlibs/dropdownshowhide/js/dropdownshowhide.js


If you see the code the target elements are selected based on data attribute and which is common for all the targeted elements within the multifield item. That's why on the selection of one other also getting changed.


To handle this you can find the index/position of the multifield item. If dropdown and targeted element both are within the same multifield item then only do show hide for this set of items.


Example code:


This code will only be triggered when you have a select field with class or granite:class property with value cq-dialog-dropdown-showhide-multi unlike cq-dialog-dropdown-showhide


Option 2:

//You can refer AEM form component (/libs/fd/af/components/aemform). Asset Type (radio button) field has show-hide functionality .