Forums

how to create dynamic register form ?

sagig858 10 Apr, 2012
Hi

i want to create a register form for joomla website that dynamic by business type.

i mean that i have 5 types of businesses(restaurant,shopping...) and i want that in the form after the user choose the business type the form will change to be with the match fields and when register he will be in the match group of users..

how can i do it?

and by the way there is any tutorial about the Dynamic Drop-down ?


thank you for your help i very need it
Sagi
Max_admin 16 Apr, 2012
Hi Sagi,

You can hide/show form extensions using JS code, this is very dependent on your form and you should find many examples here on the forums or on google.

If you need to set the user group dynamically then you may use a "Custom code" action in the on submit event(and drag it OVER your registration action) and use the code snippet below:


<?php
$form->set("joomla_registration_XXX", "new_usertype", "GROUPS_HERE");
?>


In the code above you should replace 2 things:

#1- XXX: this should be the red number assigned to your "Joomla registration" action in the wizard.
#2- GROUPS_HERE: this should be a string of the groups ids you want the user to be assigned to, for example: 2,3

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.