Can't load data into dhtmlxForm

Hello!
I have a problem. I try to load data from server into dhtmlxForm component. Data come response Ajax request as JSON, I can see it into loader.xmlDoc.responseXML, but I don’t understand, how load it in form? Field names in JSON equals to field names into Form. I try to use DataStore, but method form_1.bind(myDataStore) return an error. What I do wrong?

Hello
Try to use method setFoemData()
docs.dhtmlx.com/doku.php?id=dhtm … formdata&s[]=setformdata

Thnx, but how I can load JSON or XML responce data from loader.xmlDoc.responseXML (or responseText) into DataStore?

Data Binding:
docs.dhtmlx.com/doku.php?id=binding#form

Slightly different question, but on the same topic:
Is it possible to use a more complex JSON document to populate the form? I would like to use a JSON object of the form:

var myPersonalData = [{
name: {
firstName: “Joe”,
lastName: “Blow”
}
}]

var myFormStr = [
{type: “settings”,
position: “label-left”, labelWidth:75, inputWidth: 160, noteWidth: 250
},{ type:“fieldset”, name:“nameFieldSet”, offsetLeft: 15, width:285,
list:[
{ type:“input” , name:“firstName” },
{ type:“input” , name:“name.lastName” }
]
}];

myForm = someObj.attachForm(myFormStr);
myDataStore.parse(myPersonalData);

myForm.bind(myDataStore);

In the above example, the name “fistName” and “name.lastName” are examples of what I’ve tried, but without success. It look like only JSON objects with a flat list of properties are supported. Is it the case? Is there a special syntax I could use to make the above snippet work?

Thanks!

Unfortunately is it not possible.
You can use API of datastore and form instead of bind command to load comples data in the form. ( you can get comples object from datastore, form plain object by custom code and use form.setFormData to load the plain object in the form )