dhtmlxcombo integrated dhtmlxform


I need your help
I have the next code
var formData = [
{type: “settings”, position: “label-top”},
{type: “fieldset”, name: “mydata”, label: “Details”, inputWidth:230, list:[
{type: “block”, list:[
{type: “label”, offsetTop:8, label: “Sucursal”},
{type: “input”, name:“sucursal”, inputWidth:120, validate: “NotEmpty” },
{type: “label”, offsetTop:8, label: “Nombre”},
{type: “input”, name:“nombre”, inputWidth:120}
{type: “block”, list:[
{type: “label”, offsetTop:8, label: “Departamento”},
{type: z = new dhtmlXCombo(“depto”, “id_depto”, 200), offsetTop:8,name:“id_depto”,
onchange: z.enableFilteringMode(true),
options: z.loadXML("./xml.php?accion=depto")}]
type: z2 = z.setAutoSubCombo("./xml.php?accion=ciudad", “id_ciudad”)


{type: “block”, list:[
{type: “label”, offsetTop:43, label: “Direccion”},
{type: “input”, inputWidth:160, name:“direccion”},
{type: “button”, offsetTop:8,name:“add”, value:“Adicionar”},

                                            {type: "newcolumn"},
                                            {type: "button", offsetTop:8, name:"modificar",  value:"Modificar"}
                                    {type: "block", list:[

// {type: “button”, offsetTop:8, name:“add”, value:“add record”},
{type: “button”, name:“delete”, offsetTop:8, value:“delete record”}

    myForm = layout.cells("b").attachForm(formData);


$data = new JSONDataConnector($conn, “MySQL”);


is ok, but the value of “id_depto” and “id_ciudad” is null , and not save the value in the table in mysql

Combo groups can not be used in Form. You can get combo object and attach onChange event manually:

var formData = [ .. {type: "combo", offsetTop:8,name:"id_depto", connector:"./xml.php?accion=depto",filter:true}, {type: "combo", id: "id_ciudad", connector:"./xml.php?accion=ciudad"}, ... ] myForm = layout.cells("b").attachForm(formData); var comboParent= myForm.getCombo("id_ciudad"); var comboChild = myForm.getCombo("id_depto"); comboParent.attachEvent("onChange",function(){ comboChild.clearAll(true); comboChild.loadXML(:"./xml.php?accion=depto&parent="+comboParent.getActualValue()) })
Please see form and combo docs and samples

very thanks, is very good