Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by MARC on Dec 07, 2009 00:52
open dhtmlx forum
Dhtmlx scheduler

I want to either select a default in the forms(select) the identifier of a user when he created an event.
Answer posted by Alex (support) on Dec 07, 2009 02:40

You can customize the details form. Please check the article http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxscheduler:custom_details_form

Answer posted by marc on Dec 07, 2009 02:58
In  my forms i have two select. In the first select, i want to display the name of the user when the user create event.
I'm using this method :

scheduler.attachEvent("onEventCreated", function(event_id,event_object){
     scheduler.form_blocks.select.set_value=function(node,value,ev){
             node.firstChild.value = identifiant;
     }
     });  

But , in my other event already creating when open the forms the select also takes value of name of the user.
On this event already creating, the readonly_form = true;

In the first file, the name of user dislay. It's good.
In the secon file, in the block Assigné à :
is the name of Abdel is display in place of Claude.
Attachments (2)
Answer posted by Alex (support) on Dec 07, 2009 05:12

There is no need to place set_value method into the onEventCreated handler.

Just use:

scheduler.form_blocks.select.set_value=function(node,value,ev){
     node.firstChild.value = identifiant;
}

Where identifiant is a value that is associated with with select key.

Answer posted on Dec 07, 2009 05:18
Thanks, it's possible to disable one of my two select only

scheduler.form_blocks.select.set_value=function(node,value,ev){
 node.firstChild.value = identifiant||"";
 node.firstChild.disabled = true;
 }

With this method, my two select have disable.
Answer posted by Alex (support) on Dec 07, 2009 05:54