JOHN david

JOHN david

  • NA
  • 80
  • 5.5k

SharePoint List Form Fields Read Only

Aug 20 2018 8:44 AM
One ofthe list form field isnt becoming read only with IE but it is working in Chrome.
 
Here is the script we are using
 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script><script type="text/javascript">
$(document).ready(function() {
$(':checkbox[readonly]').click(function(){
return false;
});
$('nobr:contains("Comments and Directions")').closest('td').next().find("*").attr("readonly", "readonly"); // IE
$('nobr:contains("Comments and Directions")').closest('td').next().css("pointer-events" , "none"); // Chrome
$('nobr:contains("SIAI")').closest('td').next().find("*").attr("readonly", "readonly"); // IE
$('nobr:contains("SIAI")').closest('td').next().find("*").css("pointer-events" , "none");
});</script>​​​​​​​

Answers (2)