DHTMLX Docs & Samples Explorer

Managing options collection

To set(get) the value of a list item, use the getOptions method.
Applicable to the select, multiselect items only

var opts = dhxForm.getOptions(name); // returns options collection

To add a new option:

opts.add(new Option(text, value));

In case you use the combo item, you can get the instance of dhtmlXCombo and manipulate it using its methods. Refer to the appropriate dhtmlxCombo documentation.

var combo = myForm.getCombo("combo_name")
combo.loadXML(url);//to fill combo with options from XML file