Can't reference list within combo using getList()


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: [] }


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:

view: “scheduler”,
id: “scheduler”,
save: “samples/01_basic/data/events.php”

var clientList = $$("scheduler").$$("text").getList();


The json being returned by the load() call looks like this:


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!

OK, I think I’ve figured it out. After trying several different things, this combo definition finally worked, just in case someone else has the same problem I did.

{ view: "combo", id: "text", label: "Client", url: "api/index.php?action=get&dataset=clients", datatype: "json", type: { template: "#name#" } }

All I was missing was this bit:

type: { template: "#name#" }