SelectOptionsConnector is used by the dhtmlxForm component to fill a list of options for the 'select' item.
Don't confuse SelectOptionsConnector with OptionsConnector. The second one is an auxiliary connector and used just in the context of dhtmlxGrid and dhtmlxScheduler components. SelectOptionsConnector is an independent connector able to generate output XML data.
So, to define options of the select form's item you should make the following:
var formData = [ {type: "select", label: "Categories", connector:"options.php"}, {type: "button", value: "Proceed"} ]; myForm = new dhtmlXForm("form_container", formData);
<?php require_once("../codebase/connector/options_connector.php"); $res=mysql_connect("localhost","root",""); mysql_select_db("tasks"); $data = new SelectOptionsConnector($res, "MySQL"); $data->render_table("categories","id","value, label"); ?>
Render_table method takes the following parameters: