Hiding the ‘Forms’ button in a SharePoint list view using List Formatting

I got the following request from a community member:

Hi, I want to hide forms from the command bar. Please advise

We can achieve this in two ways:

  • Changing the users permission level from Edit to Contribute
  • By using SharePoint list formatting

If you want to change the users permission level to Contribute

Under the list settings menu, you can find Permissions. Under there, if the permissions inheritance are not broken yet you can break permissions for that list you wish to hide the ‘Forms’ option, and change the level for members from Edit to Contribute.

The Forms option appear only for people that have Edit or higher permissions in the list, and then the users with Contribute permissions would still be able to edit list items but not change list settings or see the Forms option.

If you want to keep the Edit level as is and use SharePoint list formatting JSON instead

You can use the following JSON Formatting snippet to hide the Forms button in a SharePoint list (bear in mind all the views need to have the formatting applied if you want to always hide it).

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "commandBarProps": {
    "commands": [
      {
        "key": "manageForms",
        "hide": "true"
      }
    ]
  }
}

Results

After applying this JSON formatting code in a SharePoint list view, the Forms button is hidden:

Conclusion

By using JSON formatting we can easily hide the Forms button in a SharePoint list.

Reference

Command bar customization syntax reference – Microsoft Learn

Leave a Reply

Your email address will not be published. Required fields are marked *