SharePoint Disable Control in default Add/Edit List form

We might have came across situation where we need to disabled controls on add/edit SharePoint form based on user selection or for that matter based on any condition/requirement.

Add Content Editor Webpart below the NewForm/EditForm, then include the Javascript in source editor of Content Editor Webpart

<script language=”javascript”>
$(“input[title=’title of the input control’]”).attr(“readonly”,”true”); 

Note – Make sure jquery libraries is referenced in master page or else call it content editor webpart itself.

Hope this helps…Happy Coding!!!!

(Visited 33 times, 1 visits today)