add options item to multiselect in DHTMLXform

I am trying to create a form containing multiselect. i want to populate that multiselect dynamically, is there any API that I can use for doing that.

Try the next approach:

myForm.getSelect(block_name).options.add(new Option(option_text, option_value));

Thanks a lot…

How can I delete the option from multiselect?


Is there any possibility to add more than one option at the same time? Something like:

var opts = form.getOptions('selectId'); opts.length = 0; arr = new Array([[1,'opt1'], [2, 'opt2']); opts = arr;

I want to generate new options “online”…

Thanks in advice,

Do you need to do it programmatically?