json dynamic load

Is it possible to load a form through json and ajax? I have a system where someone can choose the form they want to fill out through a menu option, and I want to retrieve the form via ajax. The form does not work in XML format, since I have html code inside the labels which doesn’t work in XML, or at least I don’t know how to make it work correctly. I have been trying to use the loadStruct function, but I just keep getting “Incorrect XML” errors. I know the json code is correct, as I can put it directly into a javascript variable and it works, just not when loading through the external json file.

Thanks for any help you can provide.

There is not appropriate api to load form structure from json file. As a workaround you can load it with additional Ajax request and then parse as json object.

Thank you for your response. I will try that. Can I request that this feature be added for a future release?

We will investigate if this feature can be added to the next version of dhtmlxForm