Set SharePoint List forms fields enable or disable using jQuery

How to set SharePoint List forms fields enable or disable using jQuery

  1. Go to a SharePoint List Form.
  2. Edit the form and add script editor web part to it.
  3. Insert the below code in the script editor web part.


Code-

<script src="../../SiteAssets/JS/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="../../SiteAssets/JS/HideFields.js" type="text/javascript"></script>

HideFields.js Code-
$(document).ready(function(){
$("input[title='Title Required Field']").attr("disabled", "disabled"); 
$("select[title='request type Required Field']").attr("disabled", "disabled");
$("textarea[title='description']").attr("disabled", "disabled");
$("input[title='requested Go-Live Date Required Field']").attr("disabled", "disabled");
$("textarea[title='page or document url Required Field']").attr("disabled", "disabled");
});



I Hope this will work for you guyz :)

Comments

Popular posts from this blog

How to Customize exported excel's cell background color in Datatables

Populate dropdown using jquery ajax in SharePoint

Customizing SharePoint list and implementing Quick search using jQuery