Hi there
I need to modd the customer registration form to have different customer fields showed on different user types
Basically this needing comes from the Italian VAT Numeber/Fiscal Code requirments.
In my past experience, I have seen that too much people do not read any kind of help you wrote in registration page, so I must have a way to split to registration form into 2 steps:
- the first has the login form for registered users, plus some links that say "if you must register as USERTYPE XX, please click here" (were the USERTYPE XX is one of the possible to choose from, i.e. "private customer", "company", "no profit organizations", etc);
- clicking on each link customer goes to the registration form (a different one per each USERTYPE), where I show them ONLY the fields you need to fill (hidding the others).
I already made the code I need to hide fields, but I can't find the way to split the actual one page registration form: may be so simple, but I can't find the way. Is there someone that could help me to get it working?
Thank you in advance
using Joomla 2.5.8 - VM 2.0.15e/f
SteP[IT]
I do something like this on the edit_address page
I use jquery to hide fields I do not want.
You can also add a parameter to the url to the page
in edit_address_userfields.php
You can add certain classes to the ones
if ($_field['name']=='agreed') {$class= etc
I also have a button on the top of the page that says "Click here to checkout as guest"
THEN: when they click it, the password & username fields disappears
It just hides the "first" table on the page,
<?php if (JRequest::getVar('addrtype')=='BT') {
$document = JFactory::getDocument();
$document->addScriptDeclaration("
jQuery(document).ready(function($) {
$('.guest').hide();
$('.create').click(function () {
$('table:first').hide('slow');
$('.create').hide();
$('.line').hide();
$('.createbutton').text('Save and Continue');
$('.guest').show();
});
});
");
$class="red m2 cursor shadow";
}
?>