1

I need to customize the form that appears when users create a new document set. It's stored as “NewDocSet.aspx” under “_layouts”, which I can’t access. Is altering that file really the only way to get a custom form, or am I missing something? When I click Settings -> Customize Form in my document library, I get a message stating “Customizing the form for this SharePoint list is not supported.” It seems Infopath forms aren’t supported for doc libraries. (Google confirms.)

Any ideas? THANK YOU!

1

Check out this article for how to create custom new form for document sets: http://msdn.microsoft.com/en-us/library/ff512780(v=office.14).aspx

1

I have discovered a simpler method, so I am updating with an alternate solution here:

  1. Navigate to the SharePoint library containing your document set

  2. Create a new Edit Form, based on the Document Set Content Type (no need to set as default)

At this point, we should have an Edit form for the Doc Set Content Type. Open this file in designer and find the section that begins with:

<WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main" Title="loc:Main"><ZoneTemplate>

Find the following WebPartPages:DataFormWebPart tag and copy the __WebPartId attribute for safe keeping. (We will return to this section of the file later)

Next you will need to copy the following ListFormWebPart (Version 2) markup:

<WebPartPages:ListFormWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{COPIED WEBPART ID}" >
<WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2">
  <Title>LIBRARYNAME HERE</Title>
  <FrameType>Default</FrameType>
  <Description />
  <IsIncluded>true</IsIncluded>
  <PartOrder>2</PartOrder>
  <FrameState>Normal</FrameState>
  <Height />
  <Width />
  <AllowRemove>true</AllowRemove>
  <AllowZoneChange>true</AllowZoneChange>
  <AllowMinimize>true</AllowMinimize>
  <AllowConnect>true</AllowConnect>
  <AllowEdit>true</AllowEdit>
  <AllowHide>true</AllowHide>
  <IsVisible>true</IsVisible>
  <DetailLink />
  <HelpLink />
  <HelpMode>Modeless</HelpMode>
  <Dir>Default</Dir>
  <PartImageSmall />
  <MissingAssembly>Cannot import this Web Part.</MissingAssembly>
  <PartImageLarge />
  <IsIncludedFilter />
  <ExportControlledProperties>true</ExportControlledProperties>
  <ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID>
  <ID>g_COPIED WEBPARTID WITH DASHES AS UNDERSCORES</ID>
  <ListName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">{LIBRARYID}</ListName>
  <ListId xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">LIBRARYID</ListId>
  <PageType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">PAGE_NEWFORM</PageType>
  <FormType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">8</FormType>
  <ControlMode xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">New</ControlMode>
  <ViewFlag xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">1048576</ViewFlag>
  <ViewFlags xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">Default</ViewFlags>
  <ListItemId xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">0</ListItemId>
</WebPart>
</WebPartPages:ListFormWebPart>

You need to update the following sections in the markup:

  1. __WebPartId="{COPIED WEBPART ID}" - Put the webpart ID you copied earlier between the brackets

  2. <Title>LIBRARYNAME HERE</Title> - Put the display name for your library here

  3. <ID>g_COPIED WEBPARTID WITH DASHES AS UNDERSCORES</ID> - Replace the dashes in the webpart ID you copied earlier with underscores and put it after the 'g_'

  4. <Title>LIBRARYNAME HERE</Title> - Put the display name for your library here

  5. <ListName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">{LIBRARYID}</ListName> - Put the list ID (with dashes, can be gotten from SP Designer) between the brackets

  6. <ListId xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">LIBRARYID</ListId> - Put the list ID (with dashes, can be gotten from SP Designer) between the tags here

Once these changes to the markup are done, lets go to the Edit Form we created earlier and delete the contained content between the following (or simply overwrite it with the ListFormWebPart (Version 2) markup we created):

<WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main" Title="loc:Main"><ZoneTemplate>

&

</ZoneTemplate></WebPartPages:WebPartZone>

Finally, we take Jake's advice and:

"At this point, you associate this form with the target Library's Document Set content type as the "New Form". " This is also done through SharePoint Designer from "Lists and Libraries" > "Your DocSet Library" > Content Types (Lower left hand panel) > Click on the Content Type you want to modify"

Update the NewForm link to reflect the link to the form we just created.

You should now have a working custom New Doc Set Form. You can even edit the page and add additional webparts!

  • If your NewDocSet form is missing Save or Cancel buttons, you can add these buttons using the following snippet tags: ************************** <SharePoint:SaveButton runat="server"/> <SharePoint:GoBackButton runat="server"/> – Clinton Person Jul 24 '17 at 15:53
0

My team and I have found a custom solution that does not require a new feature or application page.

Using SharePoint Designer, create a new Edit form at the target Library. For this example, we'll call this form CustomNewDocSet.aspx

In SharePoint Designer, navigate to a List and create a New Form of type New item form. Then, take that markup and place it into "CustomNewDocSet.aspx". This will update the 'Type' of this form from Edit to New. At this point, you associate this form with the target Library's Document Set content type as the "New Form". Upon creating a New Doc set, you should be routed to CustomDocSet.aspx and realized there were no Save or Cancel buttons!

You can add these buttons adding the following snippet between the </SharePoint:UIVersionedContent> & </asp:Content> tags:

<SharePoint:SaveButton runat="server"/>
<SharePoint:GoBackButton runat="server"/>

Afterwards, navigate to the CustomDocSet.aspx page and Edit the page to add a Script Editor webpart for any custom .css and .js

So far so good, as I have not encountered any nuances or issues with this implementation.

EDIT:

Thanks to Jake for adding the steps to associate our New Doc Set form with the Doc Set Content Type:

"At this point, you associate this form with the target Library's Document Set content type as the "New Form". " This is also done through SharePoint Designer from "Lists and Libraries" > "Your DocSet Library" > Content Types (Lower left hand panel) > Click on the Content Type you want to modify"

  • "At this point, you associate this form with the target Library's Document Set content type as the "New Form". " This is also done through SharePoint Designer from "Lists and Libraries" > "Your DocSet Library" > Content Types (Lower left hand panel) > Click on the Content Type you want to modify. – Jack Jul 5 '17 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.