Read only map_field

may i set one textarea in ligthbox to readonly

scheduler.form_blocks.textarea.set_value=function(node,value,ev){ node.firstChild.value=value||""; node.firstChild.disabled = ev.disabled; // or just = true; to disable for all events }

tried this, but it readonly all textarea in ligthbox …

Just need to set up field that cant modified throw form

You can create a custom form block, just copy paste code block related to textarea, rename “textarea” to “rotextarea” and you will have new form block type. Which can have separate logic ( can be readonly, while default textarea will continue to work as is. … om_editors

[code] scheduler.form_blocks[“rotextarea”]={
return “

		//	ev.user = node.childNodes[1].value;
			return node.childNodes[0].value;
			var a=node.childNodes[0];; a.focus(); 

scheduler.locale.labels.section_typevisit = “Тип визита”;
scheduler.locale.labels.section_userselect = “Пациент”;
scheduler.locale.labels.section_description = “Описание”;
scheduler.locale.labels.section_doctor = “Доктор”;
{ name:“typevisit”, height:22, map_to:“type”, type:“select”, options:scheduler.serverList(“type”)},
{ name:“userselect”, height:90, map_to:“patient”, type:“rotextarea”, focus:true },
{ name:“description”, height:90, map_to:“text”, type:“textarea”, focus:true },
{ name:“doctor”, height:23, type:“timeline”, options:elements , map_to:“section_id” },
{ name:“time”, height:72, type:“time”, map_to:“auto”}

it load value to rotexarea, but popup error
TypeError: Result of expression ‘document.getElementById(F[A].id)’ [null] is not an object.
not load doctor that in timeline

when change textarea to input all work’s

all working :slight_smile: