Hi, I want to populate my form using the render_array() function, but I am experiencing some difficulties.
On client side the form is loaded as follows
contactForm.load("loadform.php");
The server side file (loadform.php) contains the following code, slightly adjusted from [url]Basic Loading DHTMLX Docs.
<?php
$data = array("fname" => "first", "lname"=>"last");
$conn -> render_array($data, "", "fname,lname");
?>
Obviously it doesn’t work as $conn needs to be defined first, so I changed the server side code to
<?php
$data = array("fname" => "first", "lname"=>"last");
$conn = new FormConnector();
$conn -> render_array($data, "", "fname,lname");
?>
The output is an empty XML structure:
<?xml version='1.0' encoding='utf-8' ?><data></data>
I am not able to find any documentation on FormConnector() in combination with render_array(). I think FormConnector() needs an input variable such as with:
$conn = new GridConnector($res,"MySQL");
But I can’t figure out what this should be in this case when using render_array().
Any help here would be very much appreciated!