Reset combo in form

I have a form with a combo that is populated via JSON using reloadOptions:

[code]var myform = mywindow.attachForm([
{type:“combo”, filtering:true, name:“org_id”, inputWidth:400}
]);

myform.reloadOptions(“org_id”, “/get_orgs”);[/code]

This will render an empty combo with a list of options, waiting for user input.

How can I reset the combo after a user has selected an option to look empty again? I have used myform.reloadOptions(“org_id”, []) to remove the available options but it doesn’t remove the text from the combo itself.

I have tried the following with no effect:

myform.clear()
myform.setInputValue(“org_id”, “”)
myform.setInputValue(“org_id”, null)

Thanks for any help.

If anyone is interested, I was able to perform the operation by doing the following:


var combo_object = myform.getCombo("org_id");
combo_object.clearAll();
combo_object.addOption([[0,""]]);
combo_object.selectOption(0);
combo_object.clearAll();

I apologize for the delay.
You’re right. To operate with the combo item of the formo you need to use the getCombo() method to get the dhtmlxCombo object so you are able to apply all the dhtmlxCombo API to it.