Here we will discuss how we can hide Approve/Reject workflow ribbon button in SharePoint online using CSS. Recently we were developing few workflows using visual studio 2015 as a SharePoint hosted add-in using SharePoint online.
If you are new to workflow development using visual studio 2015, you can check out the below article.
For those custom development, we have custom Approve and Reject button and we have added some approval logic inside it. We do not want business users to click on the Approve/Reject button which presented inside the ribbon. This ribbon button is presented inside lists, document libraries, task forms ribbons. And based on the window size, the button also changed.
We can hide the ribbon button using CSS, for this we need an id and we can retrieve using any developer tool.
Below are few button ids like below for the different list, libraries or task forms.
Now to hide the buttons, we have to write css file. We can edit the page and add a script editor web part or a content editor web part and you can write the below code.
Based on the list or library, you can change the above id.
Also, you can add the CSS in a different file and refer it inside the master page. After this, the ribbon button will be hidden.
You may like following SharePoint designer workflow tutorials:
- Deploy SharePoint 2013 designer workflow into production in SharePoint online
- SharePoint Online Create Workflow History List using PowerShell or using SharePoint Designer 2013
- SharePoint 2013 designer workflow Add edit task form URL inside the email
- Create a Sequential workflow using Visual Studio 2010 in SharePoint 2010
- Create Workflow Activity using Visual Studio 2010 in SharePoint 2010
- Create approval workflow SharePoint 2010 using SharePoint designer
- Project Site Creation Using Nintex Workflows 2013 based on an Enterprise Project Type
- How to create an HTML email message in SharePoint Designer 2010 workflow?
Hope this SharePoint 2013 customization tutorial explains how to hide approve reject workflow approval button from ribbon in SharePoint online using CSS.
SharePoint Online FREE Training
JOIN a FREE SharePoint Video Course (3 Part Video Series)