Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
1.3k views
in SharePoint Server by 6 7 9

How to disable sharepoint 2016 multi line text field without disable scroll bar? I used this script to set multi line text field as read-only but it disable the scrollbar as well!

$(function() {
$($("[id=UserName][id$=inplacerte]")[0]).attr("contenteditable","false");
}); 

Please, helpe me to disable sharepoint 2016 multi line text field without disable scroll bar?


1 Answer

1 like 0 dislike
by 163 204 403
selected by
 
Best answer

In SharePoint 2016, to disable Multiline Text field without disabling Scroll bars, you can use the below JS script

$(function() {
// disable Rich Text in SharePoint without dissable scroll bar
$($("[id^=FieldName][id$=inplacerte]")[0]).attr("readonly","true").css('background-color','#E6E6E6');
}); 

For more details, Please check SharePoint Disable Rich Text Field On Edit Form

by 6 7 9
0 0
Thanks, @Mohamed, the link is very helpful!
If you don’t ask, the answer is always NO!
...