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

Description (as of version 0.9.1)

The Content Type field is a special field that only appears once multiple content types have been enabled on a list.


      // On EditForm, a Content Type field is displayed but it won't be available on NewForm
      // If you try to get the field on NewForm, an exception will be thrown and then logged below
      var field = SPUtility.GetSPField('Content Type');

      // Hide the field

      // Make the field read only

      // Set the value using the display name

      // ... or the content type ID!

      // Setting the value does not force the page postback
      // if you want to trigger the postback, use the Dropdown onchange

Check out a code example here:

Last edited May 9, 2014 at 5:10 AM by KitMenke, version 2