Hello everyone. Today I want to show you how you can use jQuery and SPServices to hide SharePoint columns based on a users group membership.
In a previous post I explained how you can use jQuery and SPServices to Auto-Fill fields. Please follow the instructions in this post but use the script below instead in your NewForm.aspx and/or EditForm.aspx pages.
Replace “TestColumn” with the Name of your column you want to hide. And replace “SharePoint Group” with the Name of your SharePoint Group. If you configured everything correctly your column will be hidden for members of the SharePoint Group you defined in the script. (To hide a column for everyone except a specific group replace
if(xml.search('SharePoint Group') != -1)
if(xml.search('SharePoint Group') == -1)
That´s it. Now you are able to hide columns from specific user groups. I hope you liked my post. See you next time 🙂
And as always you can download my script from here.