Reputation: 185
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
Reputation: 21
you can use Content editor Web part with the jquery script:
$(document).ready(function() {
$("select[id*='ContentTypeChoice']").closest('tr').hide();
)};
Upvotes: 0
Reputation: 203837
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
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:
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