Showhide in multifield from dropdown outside multifield | Community
Skip to main content
New Participant
June 17, 2022
Solved

Showhide in multifield from dropdown outside multifield

  • June 17, 2022
  • 2 replies
  • 770 views



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. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ShaileshBassi

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-3-select-drop-down-change-event-in/m-p/368416

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

 

 

Thanks

2 replies

ShaileshBassi
ShaileshBassiAccepted solution
New Participant
June 17, 2022

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-3-select-drop-down-change-event-in/m-p/368416

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

 

 

Thanks

arunpatidar
New Participant
June 17, 2022
Ronnie09Author
New Participant
June 17, 2022

@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