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
Changing the url redirect's target
Started 17 years ago by Alasdair | 5 posts |
-
Hi all,
Just upgraded to version 2 - Looking great!
I was wondering if it's possible to change the target on the url redirect after submitting a form.
When a form is embedded in an iframe & set to display a text message on submission, the iframe will reload with the success message. The problem appears to be that when redirecting to a URL the target is set to _blank and so the page will load outside the iframe - is it possible to change this to _self or _parent, which would redirect to a page within the iframe rather than outside the frame?
Keep up the good work yuniar. I've been working on a PayPal integration concept and would like to share it with all of the other MachForm users when completed - I just need to crack the target issue.
All the best,
Alasdair
Posted 17 years ago # -
Hmm.. that's actually by design, to redirect the whole page.
If you only need to redirect the content of iframe, edit your embed.php file.Search around line 44, replace this one:
echo "<script type=\"text/javascript\">top.location = '{$submit_result['form_redirect']}'</script>";
with this:echo "<script type=\"text/javascript\">parent.location = '{$submit_result['form_redirect']}'</script>";
MachForm Founder
Posted 17 years ago # -
Thanks Yuniar,
Amazing support (as always) - version 2 is looking great btw
All the best
Posted 17 years ago # -
quick note: To make the thank you page open in the iframe use self.location
Posted 15 years ago # -
This is not working for me, please I need help... the iFrame is inside an iFrame in Facebook
Posted 13 years ago #
Reply
You must log in to post.