DHTMLX Docs & Samples Explorer

Manage options collection

To set(get) the value of a list item.
Applied to select type only.

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

Adding new option:

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

In case you use 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