Hide SharePoint list columns based on user permissions
The below are the steps to set permission to List column based on user groups.
Step 1: Login to your SharePoint site and create a list as below image.
Step 2: The below is the code to hide your custom column for specific groups of user.
Step 3: Next go to the NewForm.aspx and EditForm.aspx page -> Add a Script Editor WebPart in the both page. Next, add the below code inside it. When Visitors will login to the list they can’t see the specific Name field in both pages.
You may like following SharePoint customization tutorials:
- Retrieve and Display TASK status using REST API in SharePoint
- How to show/hide columns based on the value of SharePoint radio button
- Add JSLink in Task List View in SharePoint Online
- Create a Custom Calendar in SharePoint using Rest API and jQuery
- How to add Google Analytics in SharePoint Online
- Display SharePoint list data in jQuery data table using Rest API
- What is people picker and how we will use HTML Div as a People picker control in SharePoint Online?
- Change column ordering in list forms in SharePoint Online/2013/2016
- How to remove/hide default title column from SharePoint Online list (modern/Classic)
- HTTP Error 400 The size of the request headers is too long SharePoint Online Office 365
Rajkiran is currently working as a SharePoint Consultant in India . Rajkiran having 7+ years of experience in Microsoft Technologies such as SharePoint 2019/2016/2013/2010, MOSS 2007,WSS 3.0, Migration, Asp.Net, C#.Net, Sql Server, Ajax, jQuery etc.He is C#Corner MVP (2 Times).