2

I have created user roles parent, teacher and student. I want to relate parents with a student by creating a Field Related student for only parents. I tried using User References. But that makes the field common for all user roles. I also tried Profile2 module. But that doesnot exactly fit what I want. Is there any other way to achieve that ? Any suggestions please. Thank you.

5

Field Permissions will let you assign different permissions to a field based on role.

The Field Permissions module allows site administrators to set field-level permissions to edit, view and create fields on any entity.

Features

  • Enable field permissions on any entity, not just nodes
  • Role-based field permissions allowing different viewing patterned based on what access the user has
  • Author-level permissions allow viewing and editing of fields based on who the entity owner is
  • Permissions for each field are not enabled by default. Instead, administrators can enable these permissions explicitly for the fields where this feature is needed
0
0

Use Profile2, and you can have whole sets of fields only used by the role chosen. If not, see below.

This is the best option and I'll explain:

If you have fields, and use field permissions. Say you have employee # and customer number and both are required. Field permissions allows administrators to edit all values on these fields. /sarcasm Well sorry, you can't create your user because you haven't filled in all required fields /sarcasm. So you either have to enter a phony employee number or a phony customer number depending on who you are creating.

Other option: don't have required fields, instead use complete_profile to simulate required fields.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.