This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
Show Success Message & Open Redirect in New Window
Started 12 years ago by jakedonahue | 2 posts |
-
I've searched the forum and found answers to each of these answers individually, but nothing that combines the two.
I want the user to fill out my registration form, and after they click "Submit," the "SUCCESS!" message will show for a few seconds before a new window opens up for them to pay through PayPal.
What's more, I have already implemented the code that will redirect to a specific URL based on the selection in a multiple choice (if they select "Pay Deposit" it redirects to URL #1, if they select "Pay Full Amount" it redirects to URL #2).
Posted 12 years ago # -
Hi,
You can use java script to make a delay before the page submitted to redirected url. First, you will need to put the redirect url into a session variable, you can use it like this :
$_SESSION['redirect_session'] = "http://www.domain.com";
if you refer to this page :
http://www.appnitro.com/forums/topic/dropdown-links?replies=11#post-9930
you can change the code from :
$process_result['form_redirect'] = $redirect;
to
$_SESSION['redirect_session']= $redirect;
Then edit your "view-functions.php" and go to around line 2244 for this code :
$form_markup = <<<EOT
and put these code above that line
if ($form_id == 11 && !empty($_SESSION['redirect_session'])) { $custom_redirect_url = '<meta http-equiv="Refresh" content="5;url='. $_SESSION['redirect_session'] .'">'; unset( $_SESSION['redirect_session']); }
after that, go to line 2254 and put this code around HEAD tag :
{$custom_redirect_url}
don't forget to change the id's with yours
MachForm Support
Posted 12 years ago #
Reply
You must log in to post.