Disable SharePoint People Picker Control using Javascript / Jquery

Disable sharepoint people picker control using  jquery.

 

//Include the jquery reference

<script type=”text/javascript”>
$(document).ready(function() {
var columnName = ‘Name’;
var searchText = RegExp(“FieldName=\”” + columnName + “\””, “gi”);
$(“td.ms-formbody”).each(function() {
        if(searchText.test($(this).html())) {
           $(this).find(“div[Title=’People Picker’]”).attr(“contentEditable”,false);
           $(this).find(“a[Title=’Check Names’]”).hide();
           $(this).find(“a[Title=’Browse’]”).hide();
       }
   });
});
</script>

Leave a Reply

Your email address will not be published. Required fields are marked *

Bitnami