Hi
I have my custom form editor with a select.
I would ask how can I set a option selected in the select of the form
Thanks
I’m not quite sure, what do you mean by “set a option selected in the select of the form”
Any property of event can be modified as
scheduler.getEvent(id).some_prop = some_value;
It doesn’t matter which type of input its represent
I try to explain me better
I have the lightbox configured like :
scheduler.config.lightbox.sections=[
{ name:‘description’, height:200, map_to:‘text’, type:‘textarea’ , focus:true},
{ name:‘user’, height:21, type:‘select’, map_to:‘user_id’, options:options},
{ name:‘time’, height:72, type:‘time’, map_to:‘auto’}
];
The problem is that when add a event the select hasn’t a selected option so it is empty.
And it is an error for my application because this field can’t be empty.
Now I would ask how to do to have the select wit ha preselected option when I add an event.
Thanks
scheduler.attachEvent("onEventCreated",function(id){
scheduler.getEvent(id).user_id = 1; //or some other default value
return true;
})