This Community builder plugin enables adding of multiple registration forms to Joomla. It is tested to be working in Community builder 1.2 with Joomla 1.5.

Install this plugin into Joomla through the community builder plugin installer and enable it.

Defining multiple forms

Click on this plugin under the plugin management tab and in the params section define the forms in this format:

form_name1:field_name1,field_name2

form_name2:field_name1,field_name2

  • form_name is a identifier for the form you are creating. Keep it unique and without spaces. This form_name has to be passed as a GET parameter to the default CB registration page to show up only the fields you want.
  • field_name1,field_name2 etc are the names of the fields under the Field management tab in CB.


An example entry could be like this :

agent_form:name,username,password,company_name

user_form:name,username,password,address

The 2 forms can be accessed by adding &form=agent_form and &form=user_form respectively to the default CB registration form URL.

Please note that you could also have mandatory fields in any of the forms. In such a case the mandatory fields will be filled with some text to bypass the validation checks before the form is submitted.

Passing hidden data

Sometimes it is necessary to store information based on the above defined forms. For example, when the agent_form is submitted, you may want to store a specific value say ‘agent’ in one of the CB fields (say cb_usertype) so that you can know later,what form was used by the user. This can be done using the hidden data field.

The hidden data field also uses a similar format for definining the fields.

form_name1:field_name1=value1,field_name2=value2

form_name2:field_name1=value1,field_name2=value2

So here, once the form_name1 is submitted, the field_name1 will have the value set to value1.

Note that the value should not contain any special characters like commas or quotes. The value is added directly to the database as soon as the user registration is confirmed and hence will skip any validation checks.

One of the real world applications of this feature is by combining with the JLS grouping plugin which will add the current user to the necessary user group based on one of the CB fields.

This is Based on “Different User Registration Forms” plugin by Bog Imp

CB Multiple Registration forms plugin
(7626 hits)
CB Multiple Registration forms plugin
Download

If you need any new features on this extension, leave a comment below. I will be happy to add them :)

Adding form specific title/description

You can add multiple delimiter fields to your CB fields list which enables you to add any html code or static text to your form. This technique combined with the above plugin can create multiple CB forms with form specific titles. But the only limitation here is that the field names for the delimiter fields are also displayed. I dont think there is a way to avoid that.

Auto assign user group based on the registration form

I have modified Jorge Luis Savoini’s (aka BestBeast) JLS group selector plugin to make it work for Joomla 1.5 and CB2.2. This CB plugin also needs to be installed using CB plugin installer. This plugin allows you to assign different user groups based on a value from combo box which the user selects during Registration. But in real world applications, you may not want to ask the user to explicitly specify the user group, but instead you want to redirect them to the appropriate form and use the hidden data method in the above plugin to pass the required data to cb_usertype field. More details on the joomla extensions page for JLS group selector.

Modified JLS group selector
(1360 hits)
Modified JLS group selector
Download

For those who want to display partial CB registration form as a module on your homepage , this extension might be useful.

Incoming search terms: