Set, Hide or Read Only Fields in SharePoint List Forms

Found a very useful helper in codeplex: SPUtility.js


  • Set or get field values
  • Make a field read only
  • Hide a field from view
  • No server side code to deploy!

I found it very useful. Here is my own prefered way to do:

  1. I put my script in .txt files and upload to a configuration library.
  2. Then, I create a Content Editor Web Part in each of DispForm.aspx / EditForm.aspx / NewForm.aspx.
  3. In the CEWP settings, set the url of my script files.

By doing so, I do not need to go edit the page each time I need to edit the script. I can just go edit the script in the library. Multiple pages that use the same script also can benefit in such way.

3 thoughts on “Set, Hide or Read Only Fields in SharePoint List Forms”

Leave a Reply

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