Joppo
Joppo

Reputation: 729

How to get different custom registration forms for different user groups in Joomla 3.x?

I have 2 groups of users, say Group A and Group B, which both require a different user registration form. So each each form has a different set of form fileds on top of the default Joomla form.

I found out how to create a plugin to override the standard form fields for just one registration form - referring to http://library.logicsistemi.it/en/joomla/general-topics/93-joomla-3-custom-fields-for-user-s-profile.

But I don't know how to setup a user menu with 2 links to 2 different form fields; I dont think its possible to do this via the Joomla administrator site using the Menu manager; for the Menu itemtype in the Menu manager one can only select one standard Registration Form.

So I assume some coding is required, but how to approach this? (my Joomla coding experience is stil limited)

Appreciate your help;-)

Upvotes: 2

Views: 1506

Answers (3)

Eoin
Eoin

Reputation: 1515

You can use a form component to override the registration. Breezing forms is my weapon of choice. You will need two different forms.

Then you can do a hidden field and set the user group ID to stick them in that group.

You might also look at their integrator which may help. Sorry this isn't a comprehensive answer it's late here. See how you get on and comment if you still need help.

Upvotes: 0

Girish
Girish

Reputation: 61

You can use Joom Profile extension for managing user profile fields according to usergroup, on the same page of registration.

You can look for other extensions at JED

Upvotes: 1

Hans Wassink
Hans Wassink

Reputation: 2577

You can easily customize your form. Just make one form, and then change the fields using the group ids in $user. (A user can have more than one group).

For example:

$user = JFactory::getUser();
$groups = $user->groups;

if(in_array(YOURGROUPID, $groups)){
    // do something for that group
}

It's especially easy with the plugin you made using that tutorial, because you can just include / exclude the form fields you want and it adds it to the #__user_profiles met database.

Good luck

Upvotes: 1

Related Questions