Share via


Hiding just "Page" and "Edit" ribbon option in Editform of Sharepoint list

Question

Thursday, September 22, 2016 4:40 PM

hi all, 

i came across how to hide the ribbon items in sharepoint list editform, but when i do that all the ribbons including "Site Actions" goes off,

is there a way where i can just hide the "Page" and the "Edit" tab  in the main ribbon ?

thanks in advance

All replies (5)

Thursday, September 22, 2016 5:28 PM ✅Answered

Hi,

Yes it is possible

Please check below

https://hamzamasoodnaqvi.wordpress.com/2012/07/18/remove-browse-page-and-edit-button-from-sharepoint-2010-ribbon/

https://social.technet.microsoft.com/Forums/office/en-US/09dcc0a9-aead-450b-b7e8-912dce63e6a1/hide-the-page-option-on-ribbon-in-sharepoint?forum=sharepointdevelopmentprevious

Please remember to click Mark as Answer on the answer if it helps you


Thursday, September 22, 2016 5:53 PM ✅Answered

Find the css classes of the ribbon elements you want to hide using the IE developer toolbar. Add a content editor webpart to the list's edit form and hide the identified DOM elements by altering the css.

Rajesh
rjesh.com| @rjesh
You don't need to buy me a beer, if helpful just smile, vote, and mark it as answer.


Friday, September 23, 2016 2:33 AM ✅Answered

Hi vkb,

Per my knowledge, there is no Page tab in a SharePoint list editform:

There are "Browse" and "Edit" tabs in list editform.

If you want to hide them, you can use IE Developer Tools(F12) to find the id of the tabs, then use JavaScript code to hide them.

In my testing, the id of "Browser" is Ribbon.Read-title, the id of "Edit" is Ribbon.ListForm.Edit-title, so, the code is:

<script type="text/javascript">
document.getElementById('Ribbon.Read-title').style.display = "none";
document.getElementById('Ribbon.ListForm.Edit-title').style.display = "none";
</script>

The result is:

Thanks,

Wendy

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected]


Thursday, September 29, 2016 9:46 AM

Hi,

I am checking to see how things are going there on this issue.

Thanks,

Wendy

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected]


Friday, October 26, 2018 11:37 AM

#s4-ribbonrow  {
     visibility: hidden;
    }

this should work, . add this inside a CE WP