<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Redirect on error or success</title>
		<link>https://legacy.forums.gravityhelp.com/topic/redirect-on-error-or-success</link>
		<description>Gravity Support Forums Topic: Redirect on error or success</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 10:46:25 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/redirect-on-error-or-success" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Redirect on error or success"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/redirect-on-error-or-success#post-142466</link>
			<pubDate>Tue, 05 Feb 2013 09:12:56 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">142466@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That would do it :-)&#60;/p&#62;
&#60;p&#62;Thanks for updating the topic.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>luxerman on "Redirect on error or success"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/redirect-on-error-or-success#post-142082</link>
			<pubDate>Tue, 05 Feb 2013 01:02:05 +0000</pubDate>
			<dc:creator>luxerman</dc:creator>
			<guid isPermaLink="false">142082@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I forgot to add the &#34;&#38;lt;/SCRIPT&#38;gt;&#34; tags... it works now :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Redirect on error or success"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/redirect-on-error-or-success#post-142074</link>
			<pubDate>Tue, 05 Feb 2013 00:58:36 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">142074@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@luxerman, what are you trying to accomplish exactly, and on what page (URL where the form is embedded, please.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>luxerman on "Redirect on error or success"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/redirect-on-error-or-success#post-141965</link>
			<pubDate>Mon, 04 Feb 2013 23:22:50 +0000</pubDate>
			<dc:creator>luxerman</dc:creator>
			<guid isPermaLink="false">141965@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;curtis, I entered your code into the html but nothing happens. is there other coding I have to add? thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Gaslight on "Redirect on error or success"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/redirect-on-error-or-success#post-68323</link>
			<pubDate>Sat, 28 Jul 2012 05:39:32 +0000</pubDate>
			<dc:creator>Gaslight</dc:creator>
			<guid isPermaLink="false">68323@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;ps - of course the target page contains the same form as the form I want to redirect there (however, mind that the form I want to filter is embedded into a modal window found in the header of my theme - the reason why I need error messages or validation messages appear in a new page is that I can't use ajax on that modal window otherwise some other forms will be broken)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Gaslight on "Redirect on error or success"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/redirect-on-error-or-success#post-68322</link>
			<pubDate>Sat, 28 Jul 2012 05:34:38 +0000</pubDate>
			<dc:creator>Gaslight</dc:creator>
			<guid isPermaLink="false">68322@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I had a similar issue and tried to use the solution proposed by Carl&#60;/p&#62;
&#60;p&#62;however it doesn't work for me... I have a registration form (the form ID is 2)&#60;/p&#62;
&#60;p&#62;I placed this code in my functions&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function sg_regform_redirect( $form_tag, $form ) {

    $form = 2;
    $form_tag = preg_replace( &#38;#39;&#124;action=&#38;quot;(.*?)&#38;quot;&#124;&#38;#39;, &#38;#39;action=&#38;quot;&#38;#39; get_bloginfo( &#38;#39;url&#38;#39; ) . &#38;#39;/register&#38;#39; . &#38;#39;&#38;quot;&#38;#39;, $form_tag);
    return $form_tag;

}
add_filter( &#38;#39;gform_form_tag&#38;#39;, &#38;#39;sg_regform_redirect&#38;#39;, 10, 2);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I tested the form and it doesn't redirect to the page indicated, it just runs as usual. despite there are errors or not&#60;/p&#62;
&#60;p&#62;I also tried to hardcode the page to redirect the form action to, but no difference&#60;/p&#62;
&#60;p&#62;maybe I'm handling the $form value incorrectly? I only want this filter to apply on a specific form with ID = 2.&#60;/p&#62;
&#60;p&#62;can you help me?&#60;/p&#62;
&#60;p&#62;thank you
&#60;/p&#62;</description>
		</item>
		<item>
			<title>revrandy on "Redirect on error or success"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/redirect-on-error-or-success#post-53343</link>
			<pubDate>Sat, 24 Mar 2012 17:58:22 +0000</pubDate>
			<dc:creator>revrandy</dc:creator>
			<guid isPermaLink="false">53343@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I think I got it figured out. I had to make a few modifications to get it working. I decided not to redirect but to alert with javascript then refresh. I am thinking I would like to just clear the form rather then refresh, but I am using css to hide the Validation error container and messages and without refreshing the page they do not show.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;jQuery(document).ready(function(){
    if(jQuery(&#38;quot;body #gform_wrapper_2 div.validation_error&#38;quot;).length != 0){

        // code that should be run if the validation error exists goes here
  alert(&#38;quot;First Name, Last Name and Email must be filled out&#38;quot;);
  window.location.reload()
      }
});&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>revrandy on "Redirect on error or success"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/redirect-on-error-or-success#post-53333</link>
			<pubDate>Sat, 24 Mar 2012 11:46:51 +0000</pubDate>
			<dc:creator>revrandy</dc:creator>
			<guid isPermaLink="false">53333@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is there a work around for Redirecting on Errors yet? I am placing a gravity form in a header with 110px height and would like to redirect on errors. I have tried to use the javascript eCurtis posted but was not sure it I can call the Javascript from the header.php file by adding a call to a js file?&#60;br /&#62;
Something like &#38;lt;script type=&#34;text/javascript&#34; src=&#34;&#38;lt;?php bloginfo('template_url'); ?&#38;gt;/formerror.js&#34;&#38;gt;&#38;lt;/script&#38;gt;&#60;/p&#62;
&#60;p&#62;Thanks for any help!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>eCurtis on "Redirect on error or success"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/redirect-on-error-or-success#post-11048</link>
			<pubDate>Tue, 12 Oct 2010 12:23:15 +0000</pubDate>
			<dc:creator>eCurtis</dc:creator>
			<guid isPermaLink="false">11048@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I found a good workaround that I wanted to share. Instead of doing the change in GF I just detect if the error message is there and if it is I redirect via javascript/jquery. Here is the code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;/* Catalog goto page on error */
	if (jQuery(&#38;quot;#catalogFlyout .validation_error&#38;quot;).length){
    // do something here
    document.location.href = &#38;#39;/form-error&#38;#39;;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Redirect on error or success"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/redirect-on-error-or-success#post-11017</link>
			<pubDate>Mon, 11 Oct 2010 14:44:43 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">11017@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The only thing you could try doing is using a hook to hardcode the form action and point it to a page that also has the form embedded on it.  The filter you would use is the gform_form_tag filter.&#60;/p&#62;
&#60;p&#62;Here is an example:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
add_filter(&#38;quot;gform_form_tag&#38;quot;, &#38;quot;form_tag&#38;quot;, 10, 2);
function form_tag($form_tag, $form){
$form_tag = preg_replace(&#38;quot;&#124;action=&#38;#39;(.*?)&#38;#39;&#124;&#38;quot;, &#38;quot;action=&#38;#39;custom_handler.php&#38;#39;&#38;quot;, $form_tag);
return $form_tag;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That would change the form action to custom_handler.php... in your case you would probably want it to be something like this:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://mydomain.com/my/page&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/my/page&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;This is just a suggestion. Gravity Forms doesn't do what you are asking by default so no guarantees this would accomplish your goal.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
