Hello, I’m trying to add a new custom field to the event box, but it seems to add an extra section that keeps saying “Undefined”. I want to add a section called “Organizer” which is not editable by users
Attached is a picture of what i mean (I want that “Undefined” Gone)
And here is my code
function init() {
scheduler.form_blocks["campus_editor"]={
render:function(sns){
return "<div class=\"dhx_cal_ltext\" style=\"height:60px;\"><textarea rows=\"3\" cols=\"25\" readonly=\"readonly\">This is a readonly description </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();
}
}
scheduler.form_blocks["campus_organizer"]={
render:function(sns){
return "<label id='Organizer' style='height:50px;'>Organizer:</label><label id='name'></label>";
},
set_value:function(node,value,ev){ //this is a place holder
node.firstChild.value=value||"";
node.firstChild.disabled = ev.disabled;
}
}
scheduler.config.lightbox.sections=[
{ name:"organizer", height:100,map_to:"",type:"campus_organizer" },
{ name:"description", height:200, map_to:"text", type:"campus_editor", focus:true },
{ name:"time", height:72, type:"time", map_to:"auto"}
]
scheduler.config.multi_day = true;
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.init('scheduler_here',new Date(2010,0,10),"week");
scheduler.load("../scripts/dhtmlxScheduler/common/events.xml");
}