26

I have a sharepoint 2010 list, I want to hide the option "add new item" which resides below the list, any suggestions?

  • 1
    Why do you want to hide it? Is it for security or are the items added elsewhere? – Dave Wise Jan 31 '12 at 16:19
  • Hi Dave, we dont want users to add items from the link below...but they can add items to the list thru a custom webpart but not thru the link below – spStacker Jan 31 '12 at 18:52
  • Have you already managed the ribbon buttons? Do you need an answer about how to apply a HideCustomAction feature? – Alexey Krasheninnikov Jan 31 '12 at 19:40
  • Is this the solution for you? sharepoint.stackexchange.com/questions/224936/… – f_gulay Sep 5 '17 at 12:20
41

There's an out-of-the-box way to remove the Add new item link. If you edit the webpart properties using the Modify Shared Web Part command, you'll find the Toolbar Type dropdown in the List Views section. If you choose No Toolbar there and save the page, the footer link will be gone.

No code required, no unghosting/customization, and no effect on other web parts that would be added on the same page.

But you'll have to do this in every view, while the CSS way proposed by Hameds could be applied globally.

17

If you just want to hide it, you can use following css (you must override sharepoint core css with your custom css file)

td.ms-addnew{
display:none;
}
10

If you don't want to make the change globally, you could use a Content Editor Web Part (CEWP) on the desired page. Edit the HTML source of the CEWP and insert Hameds' code inside a style tag:

<style>
    td.ms-addnew { display:none; }
</style>
  • how to add multiple add new item with? for ex : if i have two content type it has to show multiple "add new item" – TinTin Mar 1 '13 at 7:39
0

Please be aware that there is a bug in SP2010 where if the toolbar type is set to "none" - if you have custom action ribbon buttons which target your library by list template ID or by content type ID, these buttons will not appear at the root folder of the library, but they will inside folders or document sets.

I have encountered this when deploying list definitions with toolbar type set to none; I have not tested this if you deploy a list and subsequently change the toolbar type to none.

  • Please use connect.microsoft.com to log this and get official verdict from MS: bug or not. Anyway, thanks for sharing this. – Alexey Krasheninnikov Jul 22 '15 at 11:32
  • I checked. It's the same problem even after you deploy a list & subsequently change the toolbar type to none. Also found that if we add CEWP to the view, view dropdown is not coming in breadcrumbs – PradeepNulu Dec 10 '15 at 5:30
0

In case you are using a page and including the list as a web part, then you just have to select the no toolbar option in toolbar type, this option is available when you choose edit web part.

-1

Try this

$('.ms-list-addnew').get(0).childNodes[1].nodeValue = " "

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.