Expand my Community achievements bar.

SOLVED

Showhide in multifield from dropdown outside multifield

Avatar

Level 7

Ronnie09_0-1655476766219.png

Ronnie09_1-1655476816455.png



I have one dropdown outside the multifield with 2 option With Image and without image

if I select with Image in dropdown 
Multifield should come up with Text area and Image
If I select without Image
Multifield should come up with only Text Area

Using AEM Showhide it is not working. Please guide me with custom JS to solve this issue

NOTE- Cannot use 2 multifield as we have used Min and Max item in multifield which is min-2 and max-8. 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Try creating out the clientlibs which will take the event from the dropdown select and hide the field by using the class.

Reference for coral ui 3 select dropdown event change javascript

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-handle-the-coral-ui...

I tried out the selection change using the category "cq.authoring.dialog" and the below js and it worked for me. 

shaileshbassi_0-1655489417245.png

 

 

Thanks

View solution in original post

3 Replies

Avatar

Level 7

@arunpatidar 

This JS I tried but it is not working, when dropdown is outside the multifield.

 

This Works when Dropdown is inside the multifield.

If you have any example where it is used in any component where dropdown is outside. Please share that, would help

 

Avatar

Correct answer by
Community Advisor

Hi,

Try creating out the clientlibs which will take the event from the dropdown select and hide the field by using the class.

Reference for coral ui 3 select dropdown event change javascript

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-handle-the-coral-ui...

I tried out the selection change using the category "cq.authoring.dialog" and the below js and it worked for me. 

shaileshbassi_0-1655489417245.png

 

 

Thanks