1

I have tried almost every permutation of jQuery to disable a multi line text field (plain text) named [Client]. Same internal name as display name. The 4 lines below have been tried one a time with no success. I need help. Been doing this for a long time and starting to wonder if SP2019 is different from SP2013. I welcome guidance

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">

$(document).ready(function() {

$("textarea[title='Client']").prop('disabled', true);
$("textarea[title='Client']").prop('disabled', 'disabled');
$("textarea[title='Client']").attr('disabled', true);
$("textarea[title='Client']").attr('disabled', 'disabled');

});
</script>
2
  • I've also reviewed and tried many solutions posted here, but I'm not having success. Commented Aug 14, 2024 at 18:27
  • Have you tried debugging? Is the selector finding the field? Your code might run before the page has finished loading and you need to make sure that the code run after the site has loaded. Read more here: sharepoint.stackexchange.com/questions/251853/… Commented Aug 16, 2024 at 7:48

1 Answer 1

1

Try this code:

$("div[id^='Client']").attr("contentEditable","false").css('background-color','#F6F6F6');

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.