Hide button in ribbon bar in dispform.aspx

Is there any way to hide or remove the "Edit Item" button in the ribbon bar of the dispform.aspx in a single list? I know that giving the user "read only" permission would grey out the button but this is not the intended approach.

Hiding the complete ribbon bar in this particular dispform.aspx would be a solution too.

Any idea?

April 25th, 2013 11:40am

You should be able to hide the complete ribbon bar using JQuery or JavaScript by finding the ID of the surrounding <DIV> and setting its CSS Display style to None.

But there really is no way to hide a single button in the ribbon.  By definition Ribbon buttons can be enabled and disabled, but they aren't supposed to be removed.

Free Windows Admin Tool Kit Click here and download it now
April 25th, 2013 12:14pm

Hello,

You can hide a single button from the ribbon.

I've done this in Sharepoint 2013 like this:

-on your display page go into page edit mode

-insert Script Editor web part and add this following script to it:

<script type="text/javascript">
    function hideEdit() {
        var edit = document.getElementById("Ribbon.ListForm.Display.Manage.EditItem-Large");
        edit.style.display = "none";
    }       
    _spBodyOnLoadFunctionNames.push("hideEdit");
</script>

Hope this helps,

April 25th, 2013 12:56pm

it is possible to do this in CSS:

<style type="text/css">
#Ribbon\.ListItem\.Manage\.EditProperties-Large
{
display: none !important;
}
</style>

Free Windows Admin Tool Kit Click here and download it now
April 25th, 2013 1:06pm

Hello,

You can hide a single button from the ribbon.

I've done this in Sharepoint 2013 like this:

-on your display page go into page edit mode

-insert Script Editor web part and add this following script to it:

<script type="text/javascript">
    function hideEdit() {
        var edit = document.getElementById("Ribbon.ListForm.Display.Manage.EditItem-Large");
        edit.style.display = "none";
    }       
    _spBodyOnLoadFunctionNames.push("hideEdit");
</script>

Hope this helps,

April 25th, 2013 1:34pm

When I tried using this code, it hid the entire ribbon.
Free Windows Admin Tool Kit Click here and download it now
November 6th, 2014 12:08am

How do I manipulate this to remove other tabs like Version History or Delete Item, etc?

Thanks,

stH

May 7th, 2015 5:24pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics