Expand my Community achievements bar.

How to populate a list box based on dropdown selection

Avatar

Level 1

I want to have a dropdown with 20 items in it. I would like the user to select an item in the drop down and have that item appear in a list box. The user could then re-select another item in the drop down and then that item would also appear under the previous. The user could then select again and again and each choice would appear in that same list box. Can someone please point me in a direction to where I could find the code to accomplish that?

1 Reply

Avatar

Level 6

I guess you are looking for some kind of customized list box (safe to call it Selectbox). I would recommend considering the following. Since by nature Drowpdown can hold the list and one selected value I would separate "Select list" and "Selected list". The for selecting the list you can either use DD or ListBox and for listing already selected ones I you may use Listbox so multiple can be displayed at same time. having both separated now when user selects one or more options you would write code to remove those selections from the DD or List box and then add the same to the Selected Listbox. You may also nee to add code to do visaversa.