Hi there,
I have a form that have 2 parts, login/register.
The register part only show if the user try the social login and it's not registered yet.
I'm using a event switcher to load a Load CSS action to show/hide the div login/register
When I try the social register or enter in the login page It load perfect. The problem is if the user submit the form and have some validation problem (ie. wrong captcha, don't fill some required field...), on this case when re-load the page, the event switcher will always return "login".
As you can see in the url
Why the event switcher always return login then?
Please, help me,
Thanks in advance,
BN
I have a form that have 2 parts, login/register.
The register part only show if the user try the social login and it's not registered yet.
I'm using a event switcher to load a Load CSS action to show/hide the div login/register
<?php
if(isset($_GET['runFunction']) && !isset($form->data["loginUsername"])) //runFunction is the social function to login and the loginUsername is the field to make login (it need to be empty to register
{
echo "socialFunction".$form->data["loginUsername"]."!"; //Debug echo
return 'socialFunction';
}
else {
echo "login".$form->data["loginUsername"]."!"; //Debug echo
return 'login';
}
?>
When I try the social register or enter in the login page It load perfect. The problem is if the user submit the form and have some validation problem (ie. wrong captcha, don't fill some required field...), on this case when re-load the page, the event switcher will always return "login".
As you can see in the url
?runFunction=loginTwitterHA&chronoform=LoginFinal&event=submit
runFunction
is set and the echo only print login!
So, loginUsername's not set.
Why the event switcher always return login then?
Please, help me,
Thanks in advance,
BN