can i have different registration forms in drupal?
sangeetharao - November 17, 2008 - 10:04
Here i have been working on user registration,
My requirement is when user click on create new account user roles will be displayed to select on role checkbox then only the registration form will be displayed for that role.
Please give me some ideas and modules that are useful.
with regards
sangeetha rao

Here is simple solution for
Here is simple solution for different registration forms for different roles
Suppose you have two roles Employer and Appicant
1) Create your own page from where you can select which form of role will be displayed e.g in a page you have to links for two roles i.e Register as Employer OR Register as Applicant
Register as Employer will point to http://www.example.com/user/register/employer
AND
Register as Applicant will point to http://www.example.com/user/register/applicant
2) In your module implement hook_user
function yourmodule_user($op, &$edit, &$account, $category = NULL) {
switch ($op) {
case 'register':
$form['accounttype'] = array(
'#type'=>'hidden',
'#title'=>t('Account Type'),
'#value'=> arg(2)
return $form;
}
break;
case 'insert':
$u = user_load(array('uid'=>$account->uid));
//default role
$role->rid = 1;
$role->name = 'anonymous user'
if(isset($edit['accounttype'])) {
$role = db_fetch_object(db_query("SELECT rid,name FROM role WHERE name = '%d'", $edit['accounttype']));
}
user_save($u,array('roles'=>array($role->rid=>$role->name)));
break;
}
}
have a look at....
hi
please have a look at http://drupal.org/node/333260 and
http://drupal.org/project/nf_registration_mod .
I'm also looking same thing, please let me know when you find any thing