Integrate dhtmlxCombo and dhtmlxForm

Dear All,

I am trying to create a dhtmlx combo within a dhtmlxForm.
I am creating the items from an xml file with the code:

<items> <item type="settings" position="label-left" labelWidth="100" inputWidth="120"/> <item type="input" name="servicecat" label="Service Category" value="<?php print $cat; ?>" validate="NotEmpty" /> <item type="hidden" name="id" label="ID" value="<?php print $id; ?>" validate="NotEmpty" /> <item type="input" name="code" label="Code" value="<?php print $code; ?>" validate="NotEmpty" /> <item type="combo" label="Account type" name="cboTest" > <option value="admin" label="Admin"/> <option value="org" label="Organiser"/> <option value="poweruser" label="Power User"/> <option value="user" label="User"/> </item> <item label="" type="button" name="save" value="Save" /> </items>

When it renders, the form and the combo appear fine. I just want to know how to set autocomplete attributes and onchange events to the combo from the xml settings? I looked at the examples and at the forum but could not find an answer

Thanks in advance for your help…

filtering=“1” in the xml to enable filtering:


To set onChange event handler should be using combo API:

var combo = dhxForm.getCombo(“cboTest”);
/your code here/

The same problem with me.
when I render myform.getCombo(“comboname”), It returns not the combo, but null.
However, options added in xml work fine.
What’s wrong with my code?

It turns out that the xml is not loaded.
the code should run as:
combo = this.getCombo(‘combo’);
Not as:
var myform;