Hiding a field on a List Form

One of the more frustrating aspects of SharePoint is that permissions┬ádo not work like most people expect. Unlike a folder, where you can assign someone read access to the folder, read access to one file & edit access to another file, SharePoint access is across the board when it comes to list data. It’s more like a spreadsheet where you want someone to see & edit Columns A & C on each row but not Column B.

Anyway, one of the sites I admin for needed to hide specific buttons & fields on the Edit form for one group of users, while still allowing them to edit other fields on the form. What I ended up with was the following script that uses jQuery and SPServices to dynamically hide an item based on group membership. While it doesn’t address the larger issue of a user having edit access to the entire list item (they could still get to the fields via the datasheet view, for instance), it DOES allow you to hide specific items on the list form according to what groups the user is in.

Continue reading

Advertisements