I created a custom light box section
//this is to create a new lightbox section
scheduler.form_blocks["CID"]={
render:function(sns){
return "<div class=\"dhx_cal_ltext\" style=\"height:60px;\"><textarea rows=\"3\" cols=\"25\"></textarea></div>";
},
set_value:function(node,value,ev){
node.childNodes[1].value=value||"";
node.childNodes[4].value=ev.details||"";
},
get_value:function(node,ev){
ev.location = node.childNodes[4].value;
return node.childNodes[1].value;
},
focus:function(node){
var a=node.childNodes[1]; a.select(); a.focus();
}
}
and I also made it hidden, so that I can submit other data with it
[code]//this is to make the CID section hidden
scheduler.form_blocks.CID.set_value=function(node,value,ev){
var sns = this.config.lightbox.sections;
for (var i = 0; i < sns.length; i++) {
if (sns[i].name == “CID”){
node.firstChild.value = “<?php $cid= $_GET['cid']; echo $cid ?>”;
//alert(node.firstChild.value);
var style = “none”;
node.style.display = style; // editor area
node.previousSibling.style.display = style; //section header
scheduler.setLightboxSize(); //force lightbox auto-sizing
}
}
}[/code]
My lightbox section is as follows
scheduler.config.lightbox.sections = [
{ name:"name", height:40, map_to:"text", type:"textarea" , focus:true },
{ name:"details", height:200, map_to:"details", type:"textarea"},
{ name:"recurring", type:"recurring", map_to:"rec_type", button:"recurring" },
{ name:"time", height:72, type:"calendar_time", map_to:"auto" },
{ name:"CID", height:40, map_to:"Company_ID", type:"CID"}
];
My problem is adding the CID section type to the lightbox strangely causes the save button to stop working, and when I change the type to textarea it works. when I click the save button nothing happens- it dosent close the lightbox neither does it save the event. Please help me I dont know what i’m doing wrong
Thanks in advance