SPUtility.js

http://sputility.codeplex.com/


Installation

To use the library, you can just upload SPUtility.js and prototype.js 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.

Usage Examples:

Set a Text field's value

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

144458

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

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

144459

Make a Choice field read only

Before
144471

SPUtility.GetSPField('Status').MakeReadOnly();

After
144468

Set a People field and/or Make it Read Only

SPUtility.GetSPField('Assigned To').SetValue('Menke, Kit');

152982

SPUtility.GetSPField('Assigned To').MakeReadOnly();

152983

Hide a field from view

Before
144469

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

After
144470

Comments

Popular posts from this blog

IRM and the Object Model

This content database has a schema version which is not supported in this farm

Activate and Deactivate Feature through PowerShell