5

Anyone know how to get rid of the Edit form option when you click on a SharePoint list item. Mainly the Edit columns option.

If it can be based on permissions that would be great so the owner can show and hide the columns they want to be editable/not editable.

enter image description here

1
  • I think you can use SPFx application customizer for such requirements to hide the ribbon commands. Commented Jun 26, 2020 at 11:15

3 Answers 3

2

Found the answer in Permission levels. Change the Edit Permission level to unchecked for Manage Lists under List Permissions. The option to edit columns is there but the permission is set fail it when attempting to hide or show a column. Owners can still hide/show.

enter image description here

2

You can check out https://github.com/pnp/sp-dev-fx-extensions/tree/master/samples/js-command-hide-commands.

This extension can hide any commands from the command bar.

1

It should be possible through the SharePoint Online customization,

Hiding ribbon command icons such as edit form, edit all, copy links elements are possible through the Javascript, or CSS coding:

Using CSS:

<style>
#Ribbon\.ListForm\.Edit\.Commit\.Publish-Large
{ display:none !important; }
</style>

Using javascript:

document.getElementById("Ribbon.ListForm.Edit.Commit.Publish-Large").style.display="none";

Note:

  • In modern SharePoint online we cannot add the custom CSS or javascript code, so we can deploy the modern script editor web part and use these or create a separate SPFx application extension project. Install the modern script editor web part from here.

References:

Hide a Save button at List Ribbon in SharePoint via CSS or JavaScript

Is it possible to hide the top toolbar options

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.