Thursday, July 16, 2009

How to make different registration fields for different targeting audiance in Drupal

How to make different registration fields for diffrent targeting audiance in Drupal.
Its very easy , just follow the step below....
Pre ruirements : drupal,cck,rules
1. Create One Content Type called "student"
2. Goto manage field for this content type
3. Add as many field as you wanted to display for "student" registration
like you may want student's name,username,email address,university. Save it.
4. Add one role called "student_role"
5. Create One Content Type called "teacher"
6. Goto manage field for this content type
7. Add as many field as you wanted to display for "teacher" registration
like you may want teacher's name,username,email address,past exp,date of birth, city and many more fields .... Save it.
8. Add one role called "student_role"
9. Add one rule called "Student Sign Up"
10. Select "after saving new content" from event
11. Select "content has type"
12. Select "student" in the listed option
13. Add action called "Create a user",
14. In the username field "field_student_user_name[0][value]; ?>" provided you have given same field name while creating your cck field username for student
15. In the Email field "field_student_email[0]['email']; ?>" provided you have given same field name while creating your cck field email for student
16. Add action called "Add a role"
17. Select new user have "student_role"
18. Add action called "Send a mail to user"
19. Add action called "Changed author of content"
20. Do same thing for teacher also
21. Thats it ....u rock on.......
22. More detail .mail me at amitpatel049@gmail.com

1 comment:

  1. Great amit but it is not useful while the password is user selected

    ReplyDelete