3

I managed to customize the New Form for my Content Types which inherit from Document Set as follows:

  1. put a copy of 15\TEMPLATE\LAYOUTS\newdocset.aspx in 15\TEMPLATE\LAYOUTS\MY\myNewDocSet.aspx. In this page, I played with SPUtility to hide and make read only fields and add some dynamic behaviour.
  2. powershell $contentType.NewFormUrl = "_layouts/MY/myNewDocSet.aspx".

I would like to do the same for the Edit Form of my content types, but don't know from which file to start.

Thank you for your insights, AllWorkNoPlay

  • Our consultant gave me the hint to use JSLink on the Edit form. A drawback is that this Edit form is linked to the library and not to the content type, but I will give it a try. This way I am confident I do not base on the wrong Edit form. – AllWorkNoPlay Dec 23 '16 at 15:14
  • I ended up having a piece of Javascript code in the Style Library that I included in a custom page MyNewDocSet.aspx, and added as a Content Web Part to the Edit form of the document library. In the Javascript I test the content type like this: if (typeof(WPQ1FormCtx) != 'undefined' && WPQ1FormCtx != null) { currentContentType = WPQ1FormCtx.ListData.ContentType; } else { currentContentType = WPQ2FormCtx.ListData.ContentType; } – AllWorkNoPlay Jan 31 '17 at 13:27
  • Have you ever seen a WPQ1FormCtx object? I'm doing some searching to see if WPQ2FormCtx is always going to have that name, and this is one of only 2 search results showing something other than WPQ2FormCtx. The other one is someone speculating as to whether WPQ3FormCtx will ever exist. – Dinerdo Oct 11 '17 at 15:08

Your Answer

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

Browse other questions tagged or ask your own question.