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?

  • April 11, 2022
  • 3 replies
  • 2958 views

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.

3 replies

Kiran_Vedantam
Community Advisor
Community Advisor
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

PhaniRajuTanneru
Level 2
April 11, 2022
arunpatidar
Community Advisor
Community Advisor
April 11, 2022

Hi Rahul,

 

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

Arun Patidar
Level 4
April 12, 2022

in HTL @arunpatidar