Waleed
Waleed

Reputation: 185

How to change in EditForm.aspx of Document library Sharepoint 2010

I have a document library and I add a content type Link to Document, whenever open Edit properties (EditForm.aspx) I see a first row which is dropdown list contains both content types. I want to remove this row so the user will not have change to default content type.?

Upvotes: 2

Views: 15164

Answers (3)

Aissam
Aissam

Reputation: 21

you can use Content editor Web part with the jquery script:

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

Upvotes: 0

Servy
Servy

Reputation: 203837

  1. Ensure that your content type is the default content type
  2. Go to the list/library settings
  3. Go to advanced settings
  4. Change the first option "Specify whether to allow the management of content types on this document library..." to no.

This will remove the option to change the content type on the edit page on all out of the box edit forms. No custom code/forms needed.

Upvotes: -1

chase huber
chase huber

Reputation: 794

I would suggest creating a custom edit form for the 'Link to Document' content type.

In SharePoint designer, click on 'Lists and Libraries' and then click on the document library you want to apply the change to. Locate the 'Forms' section, typically on the right, in the middle. Click the 'New...' button. In the Create New List Form dialog, give the file a name (ie EditLinkToDocument). Select the 'Edit item form...' radio button, check the option 'Set as default form for the selected content type'. In the 'Select the Content Type to use:' drop down, select the 'Link to Document' content type. Click OK to create the new form, like this:

enter image description here

That's it! Now when you see an item of content type 'Link To Document' in the all items view, when you click 'Edit Properties' you will be directed to this new form, and notice that the Content Type drop down is not visible.

Upvotes: 3

Related Questions