2
votes

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;-)

3
How are you planning to know which "group" the users are in?Elin
Hey @Joppo, if you got any solution for this issue, then please mention it here as well. Waiting for the answer... Thanks in Advance :)Nehal

3 Answers

1
votes

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

1
votes

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

0
votes

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.