This project has moved and is read-only. For the latest updates, please go here.

Final release of SPUtility.js (v0.14.2)

As of June 2016, version 0.14.2 is the final release of SPUtility.js and I will no longer be actively maintaining this project. Thank you to everyone who helped make this project a success!

As always, the code is available on GitHub so please feel free to fork / modify it yourself.


SPUtility.js is a JavaScript library used to make modifications to SharePoint's list forms (NewForm.aspx and EditForm.aspx in a survey, custom list or library). It works with SharePoint 2007, 2010, and 2013 (including SharePoint Online / Office 365).

SPUtility.GetSPField('Title').SetValue('Hello world!');


Download the latest from GitHub!!


  • Set or get field values in Document Libraries, all sorts of List forms (custom lists, issues, etc), and survey
  • Make a field read only
  • Hide a field from view
  • No server side code to deploy!

This can be used for:

  1. Preventing a user from selecting a value when an item is initially created (ex: Status must be PENDING when the item is created)
  2. Hiding fields from a submitter but allowing the field to be edited (or vice versa).
  3. Auto-populating the form using a URL with query parameters
  4. Auto-populate a list column with a sequential number
  5. Hide/Show field on list form based on value from another field

Keep in mind that SPUtility.js and documentation are still a work in progress... and that it won't work in every situation. It currently will NOT work with:

  1. External list forms
  2. Forms that have been customized using Infopath
  3. Certain (weird) fields, see the matrix of supported fields
  4. Sites with Minimal Download Strategy enabled

Getting Started

To use the library, you can just upload SPUtility.js and dependent files into a document library and put a Content Editor Web Part with some JavaScript code on whichever page you want to modify! Detailed instructions are on the Installation page.

See the Documentation for the matrix of supported fields and API documentation. Browse the Changelog to see the list of updates.

If you do find something that you would like supported or isn't quite working, please don't hesitate to post a Discussion.

Finally, if you use SPUtility.js and like it, tweet at me! @kitmenke

Usage Examples:

Set a Text field's value

SPUtility.GetSPField('Title').SetValue('Hello world!');


Set a Text field's value and make it read only

SPUtility.GetSPField('Title').SetValue('Hello world!').MakeReadOnly();


Make a Choice field read only




Hide a field from view


SPUtility.GetSPField('% Complete').Hide();


See the Documentation for more information.

Last edited Nov 27, 2016 at 4:37 PM by KitMenke, version 55