When the user is logged in, it sounds like this is working fine for you? It's when you add the additional step in to register that you don't want to lose them, after registration and want them to continue on to the original URL? Is that correct?
If so, then when the user is redirected to the registration page, you need to pass their final URL along with the form submission. Then, use that URL for the confirmation redirect for the registration form. That will put them at their original destination, even though they stopped at the registration form along the way.
Check out this sample form: http://gravity.chrishajer.com/register-then-redirect-to-original-destination/?dest=http://www.google.com
You can changed "dest=" to whatever URL you want. That is where the visitor will be redirected after registration. That is the type of link you would use when you send the visitor to the registration page. Use a hidden field which is set to "Allow field to be populated dynamically" and give it a parameter name (I used dest). Then, use that merge tag for the URL for your confirmation redirect. In my form, the redirect URL for the confirmation is {Destination:9} (field 9 is my hidden field with a name of "Destination" and a parameter name of "dest".
I used 'dest' instead of 'redirect' but the rest of the procedure is the same.
Posted 11 years ago on Sunday March 17, 2013 |
Permalink