Question

I need to migrate some values into SharePoint that would have useless values for our system going forward. I'm using a content type called "Old Request" solely so that they can have different columns and clearly be identified as such. I want to have "New Request" and "Old Request" within the same list, but I don't my users to be able to create a "New Old Request" for obvious reasons :)

Is this possible?

Was it helpful?

Solution

You can make the content type hidden by using PowerShell: Example:

$web = Get-SPWeb -Identity http://aissp2013:111
$list = $web.Lists["TestList"]
$list.ContentTypes["TestCT"].Hidden = $true
$list.ContentTypes["TestCT"].Update()

UPDATE

However, the above code or the steps given by @Robert will not hide Content Type dropdown from Edit page. That can be done by placing a script in Content Editor web part:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function(){
    // Hides the entire table row from the EditForm.aspx
        $('select[id*="Content Type"]').parent().parent().hide();
    });
</script>

Reference: http://social.msdn.microsoft.com/Forums/sharepoint/en-US/29cf0091-6d2e-413b-b6b2-b376f51ee972/how-to-disableinvisible-content-type-drop-down-for-custom-document-librarys-in-sharepoint?forum=sharepointcustomizationlegacy

OTHER TIPS

In the Document Library (or List) settings:

  1. Under the section "Content Types" click "Change new button order and default content type"
  2. Uncheck "Visible" for the Content Type you want to hide
  3. Click OK
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top