how to populate dropdown list and store item values with javascript

Avatar

Avatar
Validate 1
Level 1
PlanetSong
Level 1

Likes

2 likes

Total Posts

39 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
PlanetSong
Level 1

Likes

2 likes

Total Posts

39 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile
PlanetSong
Level 1

03-09-2016

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.

Accepted Solutions (0)

Answers (0)