This script is really simple to use, include jQuery and the Lozzi.Fields.js file, and then start using it!

<script type="text/javasccript">
$(document).ready(function(){
Lozzi.Fields.disableWithAllowance("Start Date", ["Project Managers"]);
Lozzi.Fields.disable("Task Status");
Lozzi.Fields.hideWithAllowance("Predess");
Lozzi.Fields.hide("% Complete");
});
</script>

Lozzi.Fields.disable(fieldname)

Simply disables the field, for all users. It hides all controls in the field and displays the value instead.

Lozzi.Fields.disableWithAllowance(fieldname, groups)

Disables the field, but enables it for the users in the groups specified. Also, Site Collection Administrators are included automatically, so they can always edit the field. You can send the groups in an array, like "Group One", "Group Two".

Lozzi.Fields.hide(fieldname)

Simply hides the field, for all users.

Lozzi.Fields.hideWithAllowance(fieldname, groups)

Hides the field, but shows it for the users in the groups specified. Also, Site Collection Administrators are included automatically, so they can always edit the field. You can send the groups in an array, like "Group One", "Group Two".

Last edited Jan 10, 2014 at 4:17 PM by DavidLozzi, version 1