User registration:
One user registration and there are two types:
1) Teacher
2) Student
when user come in user registration form and put mandatory information, And also there drop down list Teacher and Student, Choose one option.
And open their related fields when choosing second option first option is hidden and second will appear on the screen.
And then register.
Try using two different templates for registration. One is for Teacher and one is for student. And override the registration on your templates. That is simple and you'll have full control over the two different sections.
Related
I want to add a custom field to the Wordpress registration form without using any plugins. I want to add a dropdown menu with user-roles ( some roles I have created). Once the registration is complete the user should not have the ability to change their roles ( only admin can do that, selecting role as admin should not be allowed).
Any help will be appreciated.
I understand that you do not intend to use plugins, but you nevertheless use a theme, be it implemented by your team or some widely available theme. In any case, that theme has an implementation for your registration, so:
Find the registration form
Make sure that you find out where the registration form is.
Add a field to the form
Be it in a CMS editor or in a PHP/HTML file you must be able to edit it and add a field
Find the code which runs when a registration is posted
Again, you need to seek and find.
Enhance your functionalities which save fields
You will need to track and save the posted value
Change the database schema
You will need to do some changes on the MySQL schema in order to support the new field on database-level.
I have two user groups, student and business. On registration I want the user to select if they are a student or a business and when they click register I want them to be added to their user group automatically.
I can add the list to the registration.php and registration.xml file but how do I configure it so they get added to their specific group?
Download and try the free Joomla extension Usergroup Selector
I have tried it. It does what you want to do. You can configure it to allow the groups that you want. The groups show up on the registration form.
I have a requirement of customizing user signup form in Drupal 7. i am not getting any relevant help from the internet . so i thought i should ask the expert here.
Requirement is i have two roles say "Student" and "Teacher". I have to use default user module for their signup by setting their roles automatically.
Now there will be two links one for Student signup another for Teacher Sign up. When user click on Student SignUp i am hiding some fields of default user module which are suppose to fill by a teacher, so student will see only fields, which are specified. Same for Teacher i am hiding fields which student suppose to fill.
So basically with the use of default user module i have to perform the sign up process.
Solution what i think could be possible :
I can set a variable in the link saying "studetnSignUp?status=student" and same for Teacher "studetnSignUp?status=teacher". Now the problem is i can do this in php but do not have proficient way to the same in drupal.
If it can be possible with any other approach please let me know. As it is really urgent for me. Your support will be really appreciated.
Thanks.
You can look into Profile2 in combination with Profile2 Registration Paths. It provides you with the ability to set a unique registration path for each Profile2 profile type. Per profile type you can define different fields. And I think a helpful feature is that it can assign user roles by registration path.
I would grab the passed parameter using menu and then call
hook_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'user_profile_form') {
// do your processing here
}
}
alter the layout of the form dependant of the user, and specify the users role in the form to, ie teacher or student
We create Different Registration form for some specific users using PROFILE2 Module
But normal user registration form element appearing on every user registration form.
like username >> email >> newsletter Subscription and Full name
These fields are not manageable From Profile 2 setting page on Admin section
Can any one help me regarding this.?
manage this fields in profile type and make it as hidden from admin panel
So i've added several some custom profile fields (administer -> profiles) which is all fine but completely useless if I can't store the information in a database. I've been searching for hours now trying to figure out the "best practices" way for doing this with very little luck.
Do I add the new columns to the Users table? Do I create a whole new table? I even found a vague reference that the core profile module should have added those columns for me anyway? And that you should be able to use CCK in the core profile module (but I don't have any options for that)?
And then I would obviously want to allow user to update their own fields but the the custom profile fields aren't included in the $form array...
PS arrrggg! Drupal is driving me around the bend with its inconsistencies and having to hack it all the time!
If you use the core profile module, the database storage is provided automatically and you will not need to modify anything in the database. On install, the module adds two tables to the database, profile_fields to store your custom field definitions and profile_values to store the user supplied data for those fields.
The fields are automatically added to the user edit forms, via the hook_user implementation in profile_user() - the same mechanism is used to add the values of those fields to the user object when that gets loaded.
So if those fields don't show up for you, something is fishy - have you added your fields with 'categories'? If so, they won't show on the standard user edit page, but on additional new pages (one per category). These are added as menu type MENU_LOCAL_TASK, so they should create new 'tab' entries at the top of the user edit page - maybe you have a theme that does not display the tabs?
Another thing to check would be the fields visibility settings chosen on the fields configuration form. If that is set to 'hidden', the field is only accessible for administrators and module/theme code. You should at least set it to 'private' if the user is supposed to edit it himself.
As for using CCK fields, I don't think that this is possible with the core profile module (maybe some extension module provides this). A different approach is taken by the Content Profile Module. It creates a custom node type for user profiles so that the profile values are stored as standard Drupal nodes. One advantage of this is that you can use all CCK fields for profiles, as you just need to add those to the created node type.