Skip to main content
5 votes

Hide/disable ribbon bar buttons with client-side code

I was able to do this using pure CSS, but had to escape the "." As follows: <style type="text/css"> #Ribbon\.ListForm\.Display\.Manage\.EditItem-Large {display:none !important;} </style>...
Robin's user avatar
  • 786
5 votes
Accepted

How to customize the SharePoint online ribbon?

Ok so in order to start branding SharePoint (Office 365) you need 3 things: A CSS file A place to store the CSS file Register/associate the CSS file with the site / master page The CSS file You can ...
Tiago Duarte's user avatar
  • 5,487
4 votes
Accepted

Can't edit NewForm WebPart

This will display put the page into Edit mode and allow you to add/remove web parts: Navigate to the NewForm page. Click the Settings gear (top right). Click "Edit Page" on the Settings menu. For ...
Ornery Walrus's user avatar
3 votes
Accepted

Approve/Reject Function Disabled for Approval Workflow

I found a solution to my problem. In the settings for the document library I did this: Click "Versioning Settings" For "Require content approval for submitted items?" I selected "Yes" This allowed ...
Tokioi's user avatar
  • 75
3 votes
Accepted

Setting the ribbon to default to the browse tab instead of edit

Edit your new form page. Add script editor. Click on Edit Snippet . Add the following script <script type="text/javascript">// <![CDATA[ function ResetRibbon() { try { var ribbon = SP....
Mohamed El-Qassas MVP's user avatar
3 votes

Inject JS on page load on all the pages of SharePoint Online (non Masterpage solution)

If you want your custom js to be executed on all the pages for a site collection you could opt for JS injection through User custom action. To achieve this you must complete the following 4 steps ...
Karvannan's user avatar
  • 176
3 votes
Accepted

How to reference JavaScript file in custom ribbon action in SharePoint Online App?

The mistake you are doing is you are using List's UserCustomActions, but here your ScriptLink is the part of SPWeb or SPSite. So you code need to be like UserCustomAction Scriptaction1 = ...
Codec's user avatar
  • 1,340
2 votes

How can i add a custom tab to a ribbon at runtime using javascript/ECMAscript?

Thanks @Gilgamesh because your code has been very useful to me to understand how the whole stuff works! Even if everything wasn't correct, at least it's been helpful during the last 3 days while I was ...
AymKdn's user avatar
  • 1,189
2 votes

Showing the tab on button click

I had to add window.onload to make Shkipper's answer work: <script unselectable="on"> window.onload = function(){ var elem = document.getElementById("MSOZoneCell_WebPartWPQ2"); if (elem ...
Kevin .NET's user avatar
2 votes
Accepted

Adding a Page Layout to the drop-down menu on the ribbon

You'll want to go into Site Settings and click the Page layouts and site templates link in the Look and Feel section. Check the Page layots section to see if it is set to only use specific layouts, if ...
Eric Alexander's user avatar
2 votes

Custom Action in Ribbon

In CustomAction element, you are missing CommandUIExtension element which contains elements that extend the user interface. <CommandUIExtension xmlns="http://schemas.microsoft.com/sharepoint/"> ...
Divya Sharma's user avatar
  • 1,461
2 votes
Accepted

SPSecurityTrimmedControl isn't executed in the edit mode

I've found the reason. The problem was in this condition - if (document.getElementById("Ribbon") != null) but no in SharePoint:SPSecurityTrimmedControl. Thank's everyone for your answers.
Dmitry's user avatar
  • 41
2 votes

hide edit item ribbon in sharepoint online

It won't work because the ribbon needs time to be loaded. It's better to use CSS here. You can add: <style>#Ribbon\.ListForm\.Display\.Manage\.EditItem-Large { display:none }</style>
AymKdn's user avatar
  • 1,189
2 votes

Need only myself to be able to view the ribbon - but I do not have access to the Master Page to be able to use Security Trimming

In case you need to hide the ribbon for one page, try to do the following: Using browser, Edit your page. Add CEWP. Add the below CSS <style type="text/css"> #s4-ribbonrow { display: none !...
Mohamed El-Qassas MVP's user avatar
2 votes
Accepted

Settings bar or ribbon disappear when load NewForm or EditForm

No, I don't think it's a permission issue. In the permission issue, the ribbon will be shown but some options will be disabled with a warning message as shown below: In your case, may be the ribbon ...
Mohamed El-Qassas MVP's user avatar
2 votes
Accepted

Is there a way to hide the ribbon for a modal dialog popup in SharePoint Online?

You can edit newform.aspx page and add content editor webpart and below css code to it. <style> #s4-ribbonrow{ display:none !important;} </style> Note : this will hide ribbon and you ...
Bhaskar Dhone's user avatar
2 votes

Hide Move To/Copy To buttons -Modern Experience

Here is a similar case for your reference: Hide Move To/Copy To buttons -Modern Experience
EchoDu_MSFT's user avatar
  • 2,875
1 vote

How to hide ribbon in Calendar Item display form in SharePoint 2010

You can use JS or JQ to make a REST call to endpoint /_api/web/currentUser. This endpoint gives some information about current logged in user. It contains a property IsSiteAdmin. You can check, if the ...
ThinkB4Code's user avatar
  • 2,970
1 vote
Accepted

Add user custom action in list ribbon using powershell?

You can use the UserCustomActions.Add() method to add the custom action. Try and modify the below code: $web = get-spweb $webUrl; $list = $web.Lists[$listTitle]; $action = $list.UserCustomActions....
Gautam Sheth's user avatar
  • 30.9k
1 vote
Accepted

SharePoint 2016 Ribbon Custom Theme

It changes with the theme under site setting "Look and Feel" settings. If you want to change only banner you write css in the master page or common css file. .o365cs-base.o365cs-topnavBGColor-2, ....
Venkat Konjeti's user avatar
1 vote
Accepted

How would you explain the ribbon menu sections?

The Ribbon implementation is not just restricted to Sharepoint but is part of the Office UI that launched with this new design. The ribbon is defined by the Ribbon.xml and as per the XML schema ...
Ransher Singh's user avatar
1 vote
Accepted

How do I hide Ribbon in Page Viewer WP, but not the default one?

Edit your DispForm.aspx and add content editor web part (or script editor). Put the following script inside: _spBodyOnLoadFunctions.push(function(){ if(getParameterByName('hide')){ ...
Sergei Sergeev's user avatar
1 vote

Sharepoint Keeps my login session

I had similar issues I just replaced the suitebar found in my master page with this: <div id="ms-designer-ribbon"> <SharePoint:SPSecurityTrimmedControl runat="server" ...
sam's user avatar
  • 182
1 vote
Accepted

Disable/Remove/Hide "Pages" menu or "Page Library" or "View all pages"

You can hide Page tab using CSS: .ms-cui-tts > li:last-child { display: none !important; }
Ronak Patel's user avatar
  • 3,261
1 vote
Accepted

JavaScript to launch Spell Check when Ribbon is hidden

I once achieved it this way: <script language="javascript" type="text/javascript"> function doSpellCheck() { SpellCheckEntirePage(‘/_vti_bin/SpellCheck.asmx’,‘/_layouts/...
Gintas K's user avatar
  • 1,237
1 vote
Accepted

Html code to Hide Ribbon based on user permission in SharePoint 2013?

Edit your custom Master Page (HTML File)> To hide the ribbon for all user < div id="ms-designer-ribbon" style="display: none !important;" > To hide the ribbon based on the PermissionString &...
Mohamed El-Qassas MVP's user avatar
1 vote
Accepted

Sharepoint 2013 Calendar Views outside ribbon

one way out of the box is to change the webpart properties and switch the toolbar type to show the toolbar. So you've got at least a menue to switch the view directly above the calendar.
Celophysis's user avatar
1 vote

Ribbon save action triggered even after using return false [Page Layout Edit mode]

Subscribing to the click events is not a good idea here, for many reasons (including: you'd have to consider all buttons user can press to validate the page (in ribbon, in the page...), key events, ...
Evariste's user avatar
  • 9,731
1 vote

Make s4-titlerow always visible

Pradip's answer is very good but by this way you will always see s4-titlerow, in pop-up dialogs also. In my case it is not good to see s4-titlerow in dialog. My solution is - create new master page ...
Raf's user avatar
  • 1,038
1 vote

Page Edit ribbon is disabled in Edit mode, sharepoint online

Or, you could add a snippet to your page / template to display the ribbon, regardless of edit object (page, list, library, etc). Add a Content / Snippet web part Add the below script content to ...
KRobison's user avatar
  • 376

Only top scored, non community-wiki answers of a minimum length are eligible