I’ve used the below code to generate a select in my scheduler:
require_once("../codebase/connector/scheduler_connector.php");
$res=mysql_connect("localhost","pass","pass");
mysql_select_db("db_name");
$list = new OptionsConnector($res);
$list->render_table("tableA","firstName","clientId,firstName");
$conn = new SchedulerConnector($res);
$conn->enable_log("temp.log");
$conn->set_options("student", $list);
$conn->render_table("tableB","booking_id","start_date,end_date,text,coach,student");
and the client-side code as follows:
name: "student", height: 21, map_to: "student", type: "select", options:scheduler.serverList("student")
If I check the output for the connector.php in Chrome dev tools I can see it’s getting the correct data from my database. It’s not wrapped in CDATA, but it’s there, but the actual select is rendering the correct amount of items but the value and label are outputting ‘null’.
Would there be any particular reason for this?
Jon.