filling a lightbox value with a popup in another field

I’m trying to fill a value of the event name with the event type when it has the default event name in it.

Any suggestions?

For example, if the event type is a trial or judgement it will over-ride the New Event in the event name. Seems like I should be able to do that but don’t know exactly how/where…

Thanks,

David

336 scheduler.config.lightbox.sections=[
337 { name:“description”, height:25, map_to:“text”, type:“textarea”, focus:true },
338 {name:“event_type”, height:20, type:“select”, options: event_type, map_to:“event_type”
},
339 { name:“event_type_other”, height:25, map_to:“event_type_other”, type:“textarea”, size:
“15”, focus:true },
340 { name:“details”, height:55, map_to:“details”, type:“textarea”, focus:true },
341 { name:“cancel_reason”, height:20, map_to:“cancel_reason”, type:“textarea”, size:“15”,
focus:true },
342 { name:“media_type”, height:20, map_to:“media_type”, vertical:false, type:“radio”, opti
ons:media_types },
343 {name:“color”, height:20, type:“select”, options: event_color, map_to:“color” },
344 {name:“division”, height:20, type:“select”, options: divisions, map_to:“division” },
345
346 { name:“private”, map_to:“is_private”, type:“checkbox”, checked_value: “1”, unchecked_v
alue: “0”, height:20 },
347 {name:“recurring”, height:115, type:“recurring”, map_to:“rec_type”,
348 button:“recurring”},
349 {name:“time”, height:72, type:“time”, map_to:“auto”}
350 ];
351

Hello,
please clarify
do you wan’t value to be changed dinamically when user changes the type? If so you can attach onchange handler in control configuration. Check the code, i’ve tested it on following example
samples/01_initialization_loading/08_options.html

[code] function onTypeChange(e){
var trg = e.target || e.srcElement;
var val = trg.value;

		if(val == 2){//second type overrides the text
			scheduler.formSection("description").setValue(scheduler.getLabel("type", val));
		}
	};

	scheduler.config.lightbox.sections = [	
		{name:"description", height:200, map_to:"text", type:"textarea" , focus:true},
		{name:"type", height:21, map_to:"type", type:"select", options:[
			{key:1, label:"Simple"},
			{key:2, label:"Complex"},
			{key:3, label:"Unknown"}
		], onchange: onTypeChange},
		{name:"time", height:72, type:"time", map_to:"auto"}	
	];[/code]

docs.dhtmlx.com/scheduler/api__s … label.html
docs.dhtmlx.com/scheduler/api__s … ction.html

Thanks

-David

worked like a charm

thanks again,

-David