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?

2 Answers 2

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

-1

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

Set this to No.

4
  • 3
    This would remove content types from the library completely. The requirement is to disable the change of a content type in edit mode. Aug 11, 2015 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. Aug 11, 2015 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) Aug 11, 2015 at 13:55
  • This worked for me in SharePoint 2019
    – Sandra
    Jun 8, 2020 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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