Download the jQuery and SPServices libraries and put them in a read-only document library or in your 14 Hive, depending on what suits you. Then edit the NewForm.aspx list (using SP Designer) and add links to the two files.
Add a script tag with the following:
$(document).ready(function() { Admin_Group = "My Group Name"; if(IsGroupMember(Admin_Group)) { $('input[title="Assigned To"]').parent().parent().css("display","none"); } }); function IsGroupMember(GroupName) { var isGroupMember = false; $().SPServices({ operation: "GetGroupCollectionFromUser", userLoginName: $().SPServices.SPGetCurrentUser(), async: false, completefunc: function(xData, Status) { if($(xData.responseXML).find("Group[Name='" + GroupName + "']").length == 1) { isGroupMember = true; } } }); return isGroupMember; }
You may need to verify that the input selector is correctly referencing the assigned or the field to be hidden, but I used this approach in many situations. Make sure the field you are hiding is optional. Also remember to hide it in EditForm.aspx if you need it.
source share