Hi,
I have the following ajax call:
var services = $.ajax({
url: "../services/getservices",
async: false,
dataType: "json"
}).responseText;
which give me the following json object:
[{"key":"2","label":"Limipieza Bucal"},{"key":"3","label":"Primera Visita"},{"key":"4","label":"Periodoncia"}]
Then I use the "services" variable as the value for my "service" section in the scheduler.config.lightbox.sections as follows:
scheduler.config.lightbox.sections=[
{name:"contact", height:20, map_to:"contact", type:"textarea"},
{name:"service", height:21, type:"select", map_to:"service", options: services},
{name:"description", height:100, map_to:"text", type:"textarea" , focus:true},
{name:"time", height:72, type:"time", map_to:"auto"},
]
The problem is that the select "services" is renered with a lot of "undefined" values which is not the expected result. Are my steps correct?
Thanks
Aleix Vergés