4

I have a library with a couple of custom content types all inheriting from Document Set and in the edit form the Content Type field shows up. I would rather remove it because it doesn't make any sense for these items to change content type after they are created. I added<FieldRef ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" ShowInEditForm="FALSE"/> to the content type and list definition, but it's still showing up. How do I remove the content type field from the edit form?

3

Setting ContentType field property ShowInEditForm="FALSE" will not affect the visibility of Content Type Choice control in the Edit form.

The visibility of Content Type Choice control (ChangeContentType class) is determined by the following conditions:

How to hide Content Type Choice control

One option would be to hide the control on the client-side:

$(function() {
  $("select[id*='ContentTypeChoice']").closest('tr').hide(); 
}); 

Compatible with SharePoint 2010/2013

-2

Go to List Settings -> Advanced Settings -> Allow management of content types?

Set this to No.

  • 3
    This would remove content types from the library completely. The requirement is to disable the change of a content type in edit mode. – Paul Strupeikis Aug 11 '15 at 12:30
  • @PaulStrupeikis I don't think it will remove the content types. It will just hide the ability to manage them and at the same time hide the option to change them from the Edit form. At least that is how it is working for me. – Saksham Gupta Aug 11 '15 at 12:42
  • It must be possible somehow because a Workflow Task does not show under the New option and neither on the Edit Form. But is listed as ContentType ![](i.imgur.com/iRWMI7U.jpg) – Danny '365CSI' Engelman Aug 11 '15 at 13:55

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.