Hello!
I am new to dhtmlx and I was studying some examples in the dhtmlxScheduler.
In the dhtmlxScheduler/samples/02_customization/shared_events/ I don’t understand so much the meaning of the function default_values.
[code]function default_values($action){
global $user_id;
$event_type = $action->get_value("event_type");
if ($event_type == "")
$event_type = 0;
$action->set_value("userId",$user_id);
}
$scheduler->event->attach("beforeProcessing","default_values");[/code]
What is $action???
And why it is attach to beforeProcessing event???
Could someone explain me this,to understand better this functionality?
Thanks a lot!!!

Each time when scheduler will execute data saving ( after adding or changing some event on client side ) this code will be called on server side. Code in “default_values” can change data from client side before it will be saved in the database. In the above case it sets userId value, so all saved data will have some specific value of userId instead of the data which was received from client side ( basically - event will store id of user which have created|altered it )
What is $action???
Special object, which holds all data from client side and allows to control data saving process
docs.dhtmlx.com/doku.php?id=dhtm … ion_object
Thanks a lot Stanislav!
I am studying the document…

Bye