Jan 3, 2012

How to Remove “+ Add document" from a SharePoint 2010 Document Library

In previous article, we have learned how to hide the Select/ Deselect Check Box from a view in the list/libraries.
In this post, we will see how to remove the + Add document” option from the document library in SharePoint 2010.
We will get some scenarios where, we will display the document library I different view and in that, we don’t want this option to be shown to the users. Because, it will allow the users to upload the documents.
Suppose the below is the document library where we want to hide the Add document option
 
We can achieve this by the following methods
1.   Editing the WebPart
2.   Using SharePoint Designer(CSS)
3.   Using J Query
4.   By Permission level(Default)

1. Editing the WebPart
Go to Edit WebPart -> Tool bar Type -> Select NoToolBar option which will hide the Add Document option
2. Using SharePoint Designer(CSS)
Go to the designer and edit the page/webpart where you want to hide. Search for class=”ms-addnew” and change the style to Style=”display:none”
3. Using J Query
Add a CEWP and link the following J-Query in it and hide the CEWP webpart
$(document).ready(function()
{
$(‘#WebPartWPQ2 .ms-addnew’).hide();
});
4. By Permission Level (Default)
We can set the permission level for the document library to read only and hence the user with read only option in the SharePoint site will not see this option
We will get the following result

7 comments:

  1. It also worked for me:

    Go to the list or library>> select the list view you want to remove add new links >>> go to site actions >> edit the page >> you can edit the list view webpart >> in the tool bar option just select No tool bar >> click ok and stop editing the page................. my work is done!!!!!!!!!!! :)

    ReplyDelete
  2. "Because, it will allow the users to upload the documents." -> Why not remove the "add" action from the relevant permission level?

    ReplyDelete
  3. can add body will tell me how to store the document along with the column values of library without taking the column values from the user I mean whenever any document is uploaded then I want to store the column values associated with it by getting the data which needs to be stored using the query string in the address bar.

    Any suggestions or help is much appreciated.

    ReplyDelete
  4. thanx ..
    amazing blog

    ReplyDelete

Dear Readers,

I LOVE to hear from you! Your feedback is always appreciated. I will try to reply to your query as soon as possible.

1. Make sure to click the "Notify me" check box at the right side to be notified of follow up comments and replies.
2. Please Do Not Spam - Spam comments will be deleted immediately upon review.