Hi
After submitting a form I want the user redirect to
URL A if the user is not logged in
URL B if the user is logged in.
I guess I need the event switcher for this. But how do I get if user is logged in or not and how to set this up in event switcher?
Thanks a lot.
After submitting a form I want the user redirect to
URL A if the user is not logged in
URL B if the user is logged in.
I guess I need the event switcher for this. But how do I get if user is logged in or not and how to set this up in event switcher?
Thanks a lot.
Hi pat01,
You can use a CF shortcode to get the User ID and check if it is set - then use the result with the Event Switcher.
Adding a Debugger action temporarily will let you see how the User ID is set in the form data.
Bob
You can use a CF shortcode to get the User ID and check if it is set - then use the result with the Event Switcher.
Adding a Debugger action temporarily will let you see how the User ID is set in the form data.
Bob
Hi Bob and thanks
I dont' understand on where to get the User ID.
I use a PHP Action named kuid:
$kuid = {user:id}
This obviouslly is not working.
In the event switcher I use:

Not sure if this is correct?
Thanks a lot.
Patrick
I dont' understand on where to get the User ID.
I use a PHP Action named kuid:
$kuid = {user:id}
This obviouslly is not working.
In the event switcher I use:

Not sure if this is correct?
Thanks a lot.
Patrick
No, should be
If they're not logged in guest will be 1.
0And data source should be {user:guest}
1
If they're not logged in guest will be 1.
It now looks like this:

If user is not logged in, redirect is working to URL A: index.php?option=com_content&view=article&id=2&Itemid=101
If user is logged in, user gets redirected to /?chronoform=myformname&event=submit
instead of URL B: index.php?option=com_content&view=article&id=4&Itemid=101
I did test URL B and it is correctly working.
So redirect B is not working. Why?

If user is not logged in, redirect is working to URL A: index.php?option=com_content&view=article&id=2&Itemid=101
If user is logged in, user gets redirected to /?chronoform=myformname&event=submit
instead of URL B: index.php?option=com_content&view=article&id=4&Itemid=101
I did test URL B and it is correctly working.
So redirect B is not working. Why?
You should be using an event switcher, not a switch, and it should be the way I said. But do you need to REDIRECT or do you need to EVENT LOAD?
This topic is locked and no more replies can be posted.