Get 2 textarea when add new event (in weeks view)

Hi,

I’m using this function :
scheduler.templates.event_text=function(start,end,event){
return “Libellé: “+event.text+”
”+“Détail:”+event.details;
}

I want to know if we can have a textarea for each event (cf pictures).
When i add a new event i can write a event.text but the evant.details is “undefinied”.
I must edit with the lightbox where i had add sections, i did it like this :
scheduler.form_blocks[“my_editor”]={

// render:function(sns){
// return “

Nombre de participants : 
”;
// },

	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.config.lightbox.sections=[	
	{ name:"title", height:50, map_to:"text", type:"textarea" , focus:true},
	{ name:"custom", height:100, map_to:"details", type:"textarea"},
	//{ name:"custom2", height:25, map_to:"participants", type:"my_editor"},
	{ name:"time", height:72, type:"time", map_to:"auto"}	
]

	scheduler.locale.labels.section_title="Libellé";
	scheduler.locale.labels.section_custom="Détails";
	//scheduler.locale.labels.section_custom2="Participants";

thanks for your help

You can’t have 2 editor in “quick-edit” view, but you can define some fixed value for the “details”

scheduler.attachEvent("onEventCreated", function(id){ scheduler.getEvent("id").details = "Default value"; return true; })

Thank you, it works but maybe I can use an other way for it because it’s not what I exactly want.
Can I launch the lightbox when i add an event for example?

Yep, it possible

scheduler.config.details_on_create = true;

Thank you! That’s perfect!
If you allow me, i have a last question please…

I want, in the light box a third section where i can set a number in an input.
I did it like this :

scheduler.form_blocks[“my_editor”]={

render:function(sns){
return "

Nombre de participants : 
";
},

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.config.lightbox.sections=[
{ name:“title”, height:50, map_to:“text”, type:“textarea” , focus:true},
{ name:“custom”, height:100, map_to:“details”, type:“textarea”},
{ name:“custom2”, height:25, map_to:“participants”, type:“my_editor”},
{ name:“time”, height:72, type:“time”, map_to:“auto”}
]

scheduler.locale.labels.section_title=“Libellé”;
scheduler.locale.labels.section_custom=“Détails”;
scheduler.locale.labels.section_custom2=“Participants”;

If I erase the “render” and the “custom2” it works perfectly, but if I let it, save,abord and erase don’t work.

What’s wrong with my code please?
Thanks

you need to update set_value, get_falue and focus methods as well
set_value and get_value must contain code to set value to the custom input and get it back. Currently you have there code from the sample, which will not work for your html.
Focus can be an empty function in your case.