Hello!
I hope you can help me with this very frustrating problem that I cannot find a way to sort out.
I’m developing a version of the Mobile Scheduler using the mobile app download (dhtmlxScheduler_mobile_v35_120626). I have created a custom form using the following code:
[code]scheduler.config.form = [
{ view: "datepicker", id: "start_date …
{ view: "datepicker", id: "end_date …
// { view: "combo",id: "text", label: "Client", url: "api/index.php?action=get&dataset=clients", datatype: "json" }
{ view: "combo", id: "text", label: "Client", options: [] }
];[/code]
The first way of defining the ‘text’ combo didn’t seem to load in the json, so I hunted around in the forum here and found the second way (uncommented above).
The rest of my code is here, stripped of non-relevant stuff:
[code]dhx.ready(function(){
dhx.ui.fullScreen();
dhx.ui({
view: “scheduler”,
id: “scheduler”,
save: “samples/01_basic/data/events.php”
});
var clientList = $$("scheduler").$$("text").getList();
clientList.define("template","#name#");
clientList.load("api/index.php?action=get&dataset=clients");
});[/code]
The json being returned by the load() call looks like this:
[{"name":"Tom"},{"name":"Dick"},{"name":"Harry"}]
No matter how I try to get the list object from the combo, it is always returned as NULL. I have tried it these ways:
var clientList = $$("scheduler").$$("text").getList();
var clientList = $$("scheduler").$$("editForm").elements["text"].getList();
var clientList = $$("scheduler").$$("text_list");
These all set clientList to NULL.
Can you unlock this mystery for me?
Thanks very much!
Cam