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
2. Using SharePoint Designer(CSS)
3. Using J Query
4. By Permission level(Default)
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
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 WebPart2. 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
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 QueryGo 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”
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
Good..
ReplyDeleteIt also worked for me:
ReplyDeleteGo 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!!!!!!!!!!! :)
"Because, it will allow the users to upload the documents." -> Why not remove the "add" action from the relevant permission level?
ReplyDeletethnkx nice one
ReplyDeletecan 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.
ReplyDeleteAny suggestions or help is much appreciated.
thanx ..
ReplyDeleteamazing blog
You are welcome!
Delete