Set SharePoint List forms fields enable or disable using jQuery
How to set SharePoint List forms fields enable or disable using jQuery
- Go to a SharePoint List Form.
- Edit the form and add script editor web part to it.
- 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
Post a Comment