Custom Form

Hi,

We need to customize the lighbox popup based on event.
For some event the activity in the attached image needs to be a drop down and for some event the activity drop down should not be present.
Can anyone help me on how to do this.

I tried the below snippet. But its not working properly.

scheduler.attachEvent(“onClick”, function(id,native_event_object){

    var event = scheduler.getEvent(id);
    if(event.systemDefined == "false") {

        scheduler.config.lightbox.sections=[
            {name:"activity", height:30, map_to:"text", type:"select", options:activities,      focus:true},
            {name:"remarks", height:100, map_to:"remarks", type:"textarea" },
            {name:"custom", height:23, type:"select", options:sections, map_to:"section_id" },
            {name:"time", height:72, type:"time", map_to:"auto"}
        ]

    } else if(event.systemDefined == "true") {

        scheduler.config.lightbox.sections=[
            {name:"remarks", height:100, map_to:"remarks", type:"textarea" },
            {name:"custom", height:23, type:"select", options:sections, map_to:"section_id" },
            {name:"time", height:72, type:"time", map_to:"auto"}
        ]

}
return true;
});

Thanks,
Vijay


and for some event the activity drop down should not be present.

Check
docs.dhtmlx.com/doku.php?id=dhtm … ome_events

Hello,

Also please check following sample. You can define several lightbox configurations and use them based on some event property.

[code]

<script src="../../codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="../../codebase/dhtmlxscheduler.css" type="text/css" media="screen" title="no title" charset="utf-8">
html, body{ margin:0px; padding:0px; height:100%; overflow:hidden; }
 
 
[/code] Kind regards, Ilya