how to get all values from multiselect dropdown in aem? | Community
Skip to main content
Level 4
April 11, 2022

how to get all values from multiselect dropdown in aem?

hi , I am trying to access the selected values in AEM but only able to access the first value of the multiselect field

for e.g:

   var allRegionFields = document.querySelectorAll("coral-select.regionselect");// all multiselect fields i.e-3
         for(var i =0;i<allRegionFields.length;i++){
           console.log("validator call: ",allRegionFields[i].value); //it's returning only the 1st value selected in the multiselect
         }
 
 
how can I get all values for the multiselect dropdown
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

6 replies

arunpatidar
New Participant
April 11, 2022

Hi Rahul,

 

Where do you want to get the values, is it in the dialog or in the HTL?

Translate
Arun Patidar
Level 4
April 12, 2022

in HTL @arunpatidar 

Translate
PhaniRajuTanneru
Level 2
April 11, 2022

Hi,

Please check the below link.

 

https://www.linkedin.com/pulse/aem-hideshow-drop-down-select-options-more-than-one-values-vikraman/

 

Hope this can help you!

Translate
Kiran_Vedantam
New Participant
April 11, 2022

Hi @rahul234dabas 

 

It is suggested to access the dialog values in the java model and then pass them to HTL like this: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/htl-render-multiple-select-dropdown/td-p/277200

 

Hope this helps!

 

Thanks,

Kiran Vedantam

Translate