FormConnector in combination with render_array

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!

I forgot to include the require() line in my demo post, the whole server side script is actually:

<?php
require("../dhtmlx/codebase/connector/form_connector.php");
$data = array("fname" => "first", "lname"=>"last");
$conn = new FormConnector();
$conn -> render_array($data, "", "fname,lname");
?>

Change code like next

$data = array(array("fname" => "first", "lname"=>"last")); $conn = new FormConnector(null); $conn -> render_array($data, "", "fname,lname");

$data must be a matrix ( arrray of arrays ), not a one dimension array

Brilliant! That did the trick.
Thank you very much.