Wednesday, January 04, 2012

Hiding Upload Button in SharePoint

For many of our form libraries (in SharePoint 2007), our client wished to have the Upload button hidden. Our client has SharePoint locked down so utilizing SharePoint Designer for this was not an option. Tight restrictions like these is what led to the blog title” Coloring within the Lines”. I had to turn to jQuery in order to fulfill this request.

I came across an article here that discusses this subject and I found the following code in the comments section.


$(document).ready(function(){
$('.ms-menutoolbar td:eq(5)').hide();
$('.ms-menutoolbar td:eq(6)').hide();
});

Please note that I am not taking credit for developing this code as it came out of the comments section above but just passing along what I found to accomplish this task. I have not tested this solution in a SharePoint 2010 environment at this time.

No comments: