Hello!
what I want to do is when form is submitted it is being redicted to some page, so how I can open that redicted page into new window and not on same page?
Thanks.
Hello!
what I want to do is when form is submitted it is being redicted to some page, so how I can open that redicted page into new window and not on same page?
Thanks.
The form still has to submit to the page and either show the inline confirmation text, or redirect via javascript directly after to the new page. There's no easy way to change the target on the redirect and I'm honestly not sure of many occasions you would need to. You could always add a popup script in the confirmation text field (accepts HTML) to launch a new page, but you will probably run into problems with popup blockers.
Not sure what you're trying to achieve, but you could always use some jQuery to create an inline popup confirmation box. Here's an older post with an example.
http://forum.gravityhelp.com/topic/confirmation-via-pop-up-box
I want is just target="_blank" attribute and I dont think I want to use jquery for that.
Hi Kevin,
I found some solution from your othere post reply, it's as bewlo, but the problem is we are using multisite fuctionality and form id is different for different site.
our site link is http://www.constellationhotels.com.au and I am talking about the book now form which resides on header image area.
it is being used in all of our sites but with different Ids so what can I do?
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#gform_XX").attr("target", "_blank");
});
</script>
Thanks.
If you want to use that script to apply to all of your Gravity Forms, you wouldn't add the attribute by targeting the form ID, but instead target any form element wrapped in the the "gform_wrapper" class.
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery(".gform_wrapper form").attr("target", "_blank");
});
</script>
I am using this code above that script in the header file:
<?php wp_enqueue_script("jquery"); ?>
Nevermind, I figured it out. I was calling the script before the wp_head.
Okay, glad you figured it out. Thanks for the update.
I am using a form within a fancybox frame. I would like the confirmation page to be a normal fullwidth thank you page. I tried using your script in the header.php file but the new page loads blank.
[js]
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery(".gform_wrapper form").attr("target", "_blank");
});
</script>
It seems simple enough. I just want the Confirmation Redirect url to use target="_blank" or target="_top"....
FYI, I did not use this: <?php wp_enqueue_script("jquery"); ?>
Perhaps I am missing something? Any ideas? Any help would be great. Thanks.
FYI, the script is pops up a new blank page but the URL is incorrect. Instead of leading to the thank you page, it goes to the url where the form is located with #gf_19 at the end.
Can you post a link to your form, and also show us your confirmation settings, including the URL, and any other custom code you may be using? Thank you.