Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

how to populate dropdown list and store item values with javascript

Avatar

Level 3

data.dropdownSection = ["text1","text2","text3","text4","text5"];

This data is successfully populated to a dropdown list field with Javascript:

for(i=0;i<data.dropdownSection.length;i++){

  this.addItem(data.dropdownSection[i]);

}

The user selects one item and save the form. Now I wish to export his selection with web service, while the values of the items instead of the text in this dropdown list is saved in the exported data.

If I'm using Livecycle, to list the texts, and then to "Specify Item Values" under binding tab of the dropdown list, I can easily get the Value instead of Text in exported data. But since the dropdown list comes from javascript, I don't know how to store the values into it.

Do you have any ideas? Thank you in advance.

0 Replies