Latest Register Log In

+ Advanced Search

Separate Registration Forms by Usergroup

Separate Registration Forms by Usergroup
By
Feb 05, 2009 (Edited Mar 11, 2014)

Sometimes you may want to ask different registration questions to people depending on what usergroup they're registering to. For example, a site might have "buyer" and "seller" usergroups which need to collect different information.

First, create the additional usergroups you want at Admin Panel -> Members -> Manage Usergroups. Then select them as allowed registration usergroups at Admin Panel -> Members -> Member Settings.

At Admin Panel -> Themes -> Manage Templates, you can create custom templates for each of the special registration forms. Copy the regular registration template and modify it as desired.

Find the usergroup selector:
<tr>
<td class="labelscolumn"><span class="labels">{LANG_PROFILE_USERGROUP}:</span></td>
<td class="optionscolumn"><select name="usergroup">{USERGROUPOPTIONS}</select></td>
</tr>
Replace that with a hidden input field specifying the usergroup number applicable to that form:
<input type="hidden" name="usergroup" value="6" >
for group #6 for example.

You'll also need to add a couple more hidden input fields (anywhere, but let's say just above the submit button) to make the special template stick on an incomplete form submission reload:
<input type="hidden" name="TID" value="templatename" ><input type="hidden" name="custom" value="yes" >

Replace templatename with the name of the custom template.

Finally, replace the standard registration template with a list of links to the special registration templates:

<a href="register.php?custom=yes&TID=buyerregistration">Register in the buyers group</a>
or
<a href="register.php?custom=yes&TID=sellerregistration">Register in the sellers group</a>


That's all.




Description How to have people use a different form to sign up depending on what usergroup they want to join.
Rating
Views 482 views. Averaging 0 views per day.
Similar Listings