I have a following problem: I have a scheduler that is used by different users. When a user adds an event to scheduler, a session variable containing his id must be passed to a processor where it is inserted into a database.
My first question is how do I bind a session variable to a form that is created with a scheduler.config.lightbox.sections
:
scheduler.config.lightbox.sections=[
{name:"Customer Code", height:21, map_to:"text", type:"textarea" , focus:false},
{name:"Photographer", height:21, map_to:"pid", type:"select",
options:scheduler.serverList("type")},
{name:"time", height:72, type:"time", map_to:"auto"}
]
Is it possible to bind a session variable to it?
My second question is how do I get session variable in processor.php? Please, correct me if I'm wrong, but according to the documentation it's going to be something like this:
//... connect here
function myInsert($action){
$new_value = rand(0,100);
$action->set_value("name",$new_value);
}
$conn->event->attach("beforeInsert","myInsert");
// ...some code here
$conn->render_table("photographers_at_work", "id", "time, end_time, customer_code, pid");