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
Redirect after submission
Started 14 years ago by divyashpatel | 8 posts |
-
First off, this software was worth every penny and by far the best from what I have seen. Good job Appnitro team!
My question is this. After a form is submitted and the success page is displayed, how can I have the page be redirected to a URL after x number of seconds?
Thanks,
DivyashPosted 14 years ago # -
Thank you Divyash...
For redirect after success page, you can edit "view-functions.php" file for this. Go to around line 2229 and you'll see this code :
$form_markup = <<<EOT
then add these code above that line
if ($form_id == 1) { $custom_redirect_url = '<meta http-equiv="Refresh" content="5;url=http://www.domain.com">'; }
after that go to line 2234 for this code :
<html xmlns="http://www.w3.org/1999/xhtml">
and put this code exactly bellow that line
{$custom_redirect_url}
Don't forget to change the id with yours
MachForm Support
Posted 14 years ago # -
Sorry to sound thick, have followed instructions but it doesnt work :)
$redirect_url = '<meta http-equiv="Refresh" content="5;url=http://www.mobileautoelectrics.co.uk/form/">';
}
$form_markup = <<<EOT
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
{$custom_redirect_url}
<head>Is that the right place
Thank you
Posted 14 years ago # -
Hi Mick,
Can you send us your "view-functions.php" file please?
We'll check it.Also, let us know the URL to your form.
You can mail to: customer.service [at] appnitro.com
MachForm Founder
Posted 14 years ago # -
Sorry, I have put wrong variable name, it should :
$custom_redirect_url = '<meta http-equiv="Refresh" content="5;url=http://www.domain.com">';
I've update the code above.
MachForm Support
Posted 14 years ago # -
Cool, wasnt me being thick then :)
got a problem, i have 17 forms, i changed the code on them all, but only the first form redirects, the rest just stay on the submission page.
me thinks it could be something with this
""if ($form_id == 1) {""Posted 14 years ago # -
Yes, if you want to apply the customization to all forms. You can remove the condition, simply change the code from :
if ($form_id == 1) { $custom_redirect_url = '<meta http-equiv="Refresh" content="5;url=http://www.domain.com">'; }
to
$custom_redirect_url = '<meta http-equiv="Refresh" content="5;url=http://www.domain.com">';
MachForm Support
Posted 14 years ago # -
Thanks for the reply,
I have it going to a paypal button when a user clicks submit,
But i will refer to your post for future :) :)
Rhank you
MickPosted 14 years ago #
Reply
You must log in to post.