Pages

Wednesday 24 October 2012

How to customise the New form for a document library in SharePoint 2010.

How to customise the New form for a document library in SharePoint 2010.


Note: This is not supported by Microsoft and it just a work around.

In order to create a custom New Form for a document library we will follow these simple steps:


  1. Create a list with exact content type (List settings > Advanced settings > Allow management of content types)
  2. Then click on the Customise Form (Infopath Icon)
  3. The form will open in Infopath
  4. Once the form is open select File > Publish > Export Source Files and save it in a desired location
  5. Edit the mainfest.xsf File in a text editor (I use Notepad++)
  6. Scroll down to bottom section where you should see this:



  7. We want to change the content type ID and the relativeUrl values here to point to the document library that we want to customise the new form for:
  8. In order to get the content type ID follow this post
  9. Change the Content type ID and Relative URL (for a document library just replace ../../ with the library name does not require a prefix library either)
  10. Save the mainfest.xsf
  11. Right click and select Design, now the form will point to the library, save and publish.

On a side note:
I have only tested this with a single content type




No comments:

Post a Comment