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
BedrockMission!

Learn More

View all

Sign in to view all badges

Widget hide and show based on checkbox in dialog

Avatar

Avatar
Validate 1
Level 2
kalyan_venkat
Level 2

Likes

15 likes

Total Posts

28 posts

Correct Reply

6 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
kalyan_venkat
Level 2

Likes

15 likes

Total Posts

28 posts

Correct Reply

6 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
kalyan_venkat
Level 2

15-10-2015

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,198 likes

Total Posts

6,369 posts

Correct Reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,198 likes

Total Posts

6,369 posts

Correct Reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

18-08-2020

Option 1: This should be of some help to you: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem6-4-multifield-with-sho...

 

//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:

dropdownshowhide-multifield.js

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:

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/show-hide-dialog-fields-ba...

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