Hello,
First, i’m sorry for my not perfect english, but i hope everything will be clear for you.
I explain the situation.
I want to use the scheduler without the lightbox when creating an event. The user has to double click, or click and drag a zone to create an event.
Everything works perfectly when i use only the 3 standard fields : start_date, end_date and text.
But, i would like to add a field user_id and i try giving user_id= 2 to begin.
I found some leads on the net and you can see my php code below :
$user_id = 2;
$res=mysql_connect("localhost","root","root");
mysql_select_db("pgi_pilota");
$scheduler = new schedulerConnector ( $res );
function default_values($action) {
global $user_id;
$action->set_value ( "user_id", $user_id );
}
$scheduler->event->attach ( "beforeProcessing", "default_values" );
$scheduler->filter ( "user_id", $user_id );
$scheduler->render_table("events", "id","start_date,end_date,text,user_id");
I don’t know why, when the line with “event->attach” is not commented, nothing is inserted in the db when i create an event.
When i comment the line, the event is created, but user_id is 0.
I already read some topics about sections in the lightbox, but i don’t want to use the lightbox.
Help would be appreciated :s.
If you need more code (i mean js code), let me know it.