I need to create a user registration form in joomla a bit special.
I have three types of users: normal, honeymooners and suppliers
I wish that when one wants to record you can choose the type of recording perhaps with a choice made with a radio box
If, for esemple, user newlyweds have a few changes other than the user logged in "normal" and then go to a particular user group.
is it possible?
thanks a lot
stefano
I have three types of users: normal, honeymooners and suppliers
I wish that when one wants to record you can choose the type of recording perhaps with a choice made with a radio box
If, for esemple, user newlyweds have a few changes other than the user logged in "normal" and then go to a particular user group.
is it possible?
thanks a lot
stefano
Hi stefano,
I would use a multi-page form and have this selection on the first page. Then, if the forms are very different, you could send the different groups to different forms; or if there are just a few fields different you can use Containers with Type = Custom to selectively show blocks of elements to different types of user.
Bob
I would use a multi-page form and have this selection on the first page. Then, if the forms are very different, you could send the different groups to different forms; or if there are just a few fields different you can use Containers with Type = Custom to selectively show blocks of elements to different types of user.
Bob
Thank you Bob, very kind as always.
the fields are almost all equal then for each case there are two or three entries in more.
Is there a tutorial or guide on how to do?
stefano
the fields are almost all equal then for each case there are two or three entries in more.
Is there a tutorial or guide on how to do?
stefano
Hi stefano,
No tutorial yet - I've started one but not yet found the time to finish it.
You can set up a Container of type 'Custom' then put PHP in the Start Code and End Code boxes. I have used this code to hide/show a block of inputs (here they are still in the form but not visible):
Start:
End:
Or this version which removes the block completely:
Start:
End:
Note: Both of these need additional code to handle the case where you have validation on some of the hidden inputs.
Bob
No tutorial yet - I've started one but not yet found the time to finish it.
You can set up a Container of type 'Custom' then put PHP in the Start Code and End Code boxes. I have used this code to hide/show a block of inputs (here they are still in the form but not visible):
Start:
<?php
$display = 'none';
if ( $form->data['some_input'] == 'some_value' ) {
$display = 'block';
}
echo "<fieldset style='display:{$display};' >
<legend>Some Title</legend>";
?>
End:
</fieldset>
Or this version which removes the block completely:
Start:
<?php
$display = 'none';
if ( $form->data['some_input'] == 'some_value' ) {
?>
End:
<?php
}
?>
Note: Both of these need additional code to handle the case where you have validation on some of the hidden inputs.
Bob
This topic is locked and no more replies can be posted.