Add select field into lightbox

Der all,
I would like improve the scheduler lightbox by adding a new field based on select tag.
My new lightbox configuration is as below :

scheduler.config.lightbox.sections=[ { name:"description", height:200, map_to:"text", type:"textarea" , focus:true}, { name:"Type", height:21, type:"select", map_to:"t_task_type_fk", options:[ {key:"1", label:"Project"}, {key:"2", label:"Private"}, {key:"3", label:"Vacation"} ]}, { name:"time", height:72, type:"time", map_to:"auto"} ];
When I create an event, the lightbox is displayed with my new field (it’s good) but with the label undefined ???
Can you help me, please ?
Thanks.

Hello,

You can define the label by scheduler.locale.labels property:

scheduler.locale.labels.section_Type = “Type”;

hello

ok thanks a lot, i did see this information in the documentation.

Best regards

Hi,
How to load data from database to combo box dynamically? Any idea?

Thanks and regards,
Karthick k.

This functionality was not available in version 2.1, but is possible with 2.2 version ( check “whats new” in documentation for version 2.2 )

Hi,
Thank you for the information and also I would like to know, is it possible to implement this concept in java? because I don’t see the required method in the api. For php they have given some samples but for java they did not. I don’t know how to implement this in java. Help!

Thanks and Regards,
Karthick K.

Update for Java connectors , will be available till the end of the week.

So i have to wait till end of this week. Anyway thank you very much for the information.

hi,
Is there a way to get the id of the dropped element in dhtmlxScheduler in onEventCreated() function?. So that i can save it as event name and display it in textarea. Help me!

Thanks and Regards,
Karthick K.

the id of the dropped element
Which element do you mean?
Normally onEventCreated will contain only info of newly created event ( text property of which you can alter ) , but has not any info related to the source of event creation.

hi,
What i meant is i am dropping a div element into dhtmlxscheduler from outside the dhtmlxscheduler. In onEventCreated() function i want to get the value of the div element. This can be achieved by having id of the div element or Is there any other way to get the value of the div element when dropping into the dhtmlxscheduler ?

Thanks and Regards,
Karthick K.

There is no way to obtain such info.

You can save ID of div, while starting drag operation, and use that ID in the onEventCreated handler.

Hi,
Is it possible to hide the whole section in Init() function?

Regards,
Karthick K.

You need not define section if you need to have data , but not show it - scheduler will fetch and save all data which is configured on server side, without relation to the existence of section in the editor.

Try the updated jar from the next thread
viewtopic.php?f=6&t=13016

		SchedulerConnector c = new SchedulerConnector(conn);
		
		OptionsConnector list = new OptionsConnector(conn);
		list.render_table("types","typeid","typeid(value),name(label)");
		
		c.set_options("type", list);
		c.render_table("tevents","event_id","start_date,end_date,event_name,type","","");

Hi,
Thanks for the updated jar file. Can you send me a sample application in java because i am getting error like this Error Type:LoadXML Description:Incorrect XML.

Regards,
Karthick K.

Hi,
I figured it out by myself thanks for the updated jar file. It works now and i could see the dynamic values in combo-box. Thank you very much for your assistance.

Regards,
Karthick K.

Continuing with this, is there a possibility to show in name of event all selected fields with descriptions??

Something like this: 00:00-00:05 new event type1 type2

Yep, you can redefine the related template
Check

samples\02_customization\06_templates.html
docs.dhtmlx.com/doku.php?id=dhtm … ng_content

Hi,

Is there a possibility to add more than one OptionConnector like this,

   SchedulerConnector c = new SchedulerConnector(conn);      
   OptionsConnector list = new OptionsConnector(conn);
   OptionsConnector list1 = new OptionsConnector(conn);
   list.render_table("types","typeid","typeid(value),name(label)");
   list1.render_table("event","eventid","eventid(value),name(label)");
   c.set_options("type", list);
   c.set_options("type1",list1);
   c.render_table("tevents","event_id","start_date,end_date,event_name,type,type1","","");

I have tried this method but its not working. Is there any other way of doing it?

Thanks,
Karthick K.