How to get the selected options from a multiselect?

Hi I’m trying to get the multiselection to work. I naad the text that the user selected from the multiselect.

I tried the myForm.getItemValue() but it returns only the position of the selected items.
I need the text that they have seleced.

Then I tried the myForm.getOptions() to a variable but when I display that variable I only get [object HTMLSelectElement]

Anything else I can try?

Thx
I’m using the 4.0.1 pro version

Unfortunately, there is no way to access the initial data objects, used for multiselect construction. API provides only value of selected options.

Hmm thx for the response.

Any other things I can try? What I need is a way to let the user select a “n” number of options ( loaded from a xml file) and I need the text value of what they selected.

What I had in mind is to itterate over the choosen selections and set it in a variable. Then use that variable as a part of a little mySQL statement.

You can use getOptions API, which will return the related set of HTML options, now you can iterate through this collection and convert IDs to text label ( while options objects are different from the initial JSON structure, they contain information about value and text of each option )