Tuesday

How to assign fields for administrator only - Field Permissions

Version: Drupal 7
Sometimes we need to define fields that appears only for administrator, and not allowed other users to see or update the fields. Or in other cases, you may add "Author Name" field to "Add Article" form, and only show this field for anonymous user (if you allow unregistered users to add articles)

The Field Permissions module allows administrator to set permissions for fields, and control whom can edit and input value to this field.
 
After installing and enabling the module, go to Manage Fields --> choose the filed you want to edit,

you will find new options for this field:



  • Create FIELD (edit on node creation).
  • Edit FIELD, regardless of node author.
  • Edit own FIELD on node created by the user.
  • View FIELD, regardless of node author.
  • View own FIELD on node created by the user.
These options are  new permissions that can be added to this field.

check the permissions you need.

then go to people--> permissions -->choose the role of users

and allow the new permission for those needed roles.


It's simple and effective....