Hide The New Item Link In SharePoint 2016

SharePoint provides the new item link to add a list item to the list. At times, we get the request from the customers to hide it, depending on the presence of the user in a particular group. We can check the user's presence, using jQuery and hide the link from DOM, using CSS. Lets see, how we can hide the link from CSS point of view.


We can add the style, given below to Content Editor Web Part to achieve the hiding of the new item's link.

  1. <style>  
  2. .ms-list-addnew {  
  3. display:none;  
  4. }  
  5. </style>  

 

Add the style to a text file and upload it to the style library.


Now, we can go to the edit view of the page by appending ‘?toolpaneview=2’ at the end of the URL. Add the Content Editor Web Part to the page.


In the content link text box, add the URL of the text file, which was uploaded in the style library.


Click Apply. Heading over to the list, we can see that the ‘new item’ link has been hidden from the page.


Summary

Thus, we saw how to hide the new link, which was added in the list view Web part in SharePoint Server 2016.

Ebook Download
View all
Learn
View all