Hide Button in Ribbon SharePoint 2010

Simple question, how do you hide or remove a button from the ribbon in SharePoint?

In my case, I needed to remove the Upload Document and Open with Explorer buttons for my Form Library.

Open your site using SharePoint Designer.  Once opened, navigate to your Library and edit your default view.  (All Files -> Your Library -> Forms -> Your View.aspx, right click and select Edit File in Advanced Mode)

At the bottom of the screen, you will see three options Design, Split, and Code.  Select the Split option.

In your code window, locate the <asp:Content ContentPlaceHolderId=”PlaceHolderMain” runat=”server”>  tag.

Now, enter the code below in a line after the PlaceHolderMain tag.

<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function () 
    setTimeout(HideRibbonButton, 10);  
function HideRibbonButton()
    setTimeout(HideRibbonButton, 10);

Click save, then refresh your page.  The Documents tab should now be missing the Upload Document button and the Library tab should be missing the Open with Explorer button.

How I’m finding the items that I want to hide.
using this link:
Find the item you want to hide (open with explorer).

Then use the last part of the string OpenWithExplorer in your jquery.


The Library I’m working with is locked down and users are not able to create their own Views. If someone creates a new View, the buttons will be available on that page.

9 thoughts on “Hide Button in Ribbon SharePoint 2010

  1. Nice post but in my case, I can’t insert the css code above the tag , I put the code after in style tag.

    .ms-bodyareaframe {

    padding: 0px;


    Thank you very much…

  2. I cannot get this to work for the Approve/Reject button. I have tried ti using the ribbon Id which is ApproveReject, and the webpart ID which is Approve.Reject. It does not work either way.

  3. Try:


  4. I’m trying hide the button new folder with


    It’s didn’t work, can you help me.

  5. Great! This helped a lot.

    BTW: Fran, the keyword to use for hiding the Approve/Reject is: Moderate


    it worked fine for me!

  6. Thank you so much. This worked a treat and your answer seemed the only sensible solution I could find after a 2 hour search on the web. Keep up the good work and thank you for sharing your solution.

  7. This worked for me hiding the approve/reject button using the below:


    Thanks for the help.

Leave a Reply

Your email address will not be published.