<?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: Custom form &#34;method&#34; and &#34;action&#34;</title>
		<link>https://legacy.forums.gravityhelp.com/topic/custom-form-method-and-action</link>
		<description>Gravity Support Forums Topic: Custom form &quot;method&quot; and &quot;action&quot;</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 14:01:43 +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/custom-form-method-and-action" rel="self" type="application/rss+xml" />

		<item>
			<title>bfkouba on "Custom form &#34;method&#34; and &#34;action&#34;"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-form-method-and-action#post-13938</link>
			<pubDate>Mon, 06 Dec 2010 13:45:59 +0000</pubDate>
			<dc:creator>bfkouba</dc:creator>
			<guid isPermaLink="false">13938@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks! That works great.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_form_tag&#38;quot;, &#38;quot;form_tag&#38;quot;, 10, 2);
function form_tag($form_tag, $form){
	if($form[&#38;quot;id&#38;quot;] == 1){
		$form_tag = preg_replace(&#38;quot;&#124;action=&#38;#39;(.*?)&#38;#39;&#124;&#38;quot;, &#38;quot;action=&#38;#39;http://mydomain.org/custom/process.php&#38;#39;&#38;quot;, $form_tag);
		return $form_tag;
	}
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Custom form &#34;method&#34; and &#34;action&#34;"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-form-method-and-action#post-13866</link>
			<pubDate>Fri, 03 Dec 2010 14:48:45 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">13866@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;To target a specific form, you can use the following:&#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){
   if($form[&#38;quot;id&#38;#39;] == 10) //Change 10 to your actual form ID
       $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;You can see your form IDs on the form list page.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bfkouba on "Custom form &#34;method&#34; and &#34;action&#34;"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-form-method-and-action#post-13862</link>
			<pubDate>Fri, 03 Dec 2010 13:59:11 +0000</pubDate>
			<dc:creator>bfkouba</dc:creator>
			<guid isPermaLink="false">13862@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I would like to know this also. I'm using the code snippet, but I don't know how to target the form. I have someone working on the custom processing, but I'm responsible to change the form action. Please provide the next steps after the snippet above is in the functions.php file.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iaan on "Custom form &#34;method&#34; and &#34;action&#34;"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-form-method-and-action#post-13852</link>
			<pubDate>Fri, 03 Dec 2010 05:01:11 +0000</pubDate>
			<dc:creator>iaan</dc:creator>
			<guid isPermaLink="false">13852@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for this. &#60;/p&#62;
&#60;p&#62;Just need to check if this targets a specific form via ID? If so, where is the ID defined? &#60;/p&#62;
&#60;p&#62;Thanks!!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Custom form &#34;method&#34; and &#34;action&#34;"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-form-method-and-action#post-13537</link>
			<pubDate>Mon, 29 Nov 2010 12:33:15 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">13537@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes it is possible to change the form action, however by doing so you lose the built in validation that takes place when a form is submitted. So keep that in mind.  The hook to change the form action would be the gform_form_tag hook.&#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;</description>
		</item>
		<item>
			<title>iaan on "Custom form &#34;method&#34; and &#34;action&#34;"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-form-method-and-action#post-13518</link>
			<pubDate>Mon, 29 Nov 2010 09:17:06 +0000</pubDate>
			<dc:creator>iaan</dc:creator>
			<guid isPermaLink="false">13518@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Seeing if i can use a Gravity Form to facilitate a credit card payment via a local (South African) payment gateway.&#60;/p&#62;
&#60;p&#62;The biggest stumbling block seems to be the form method and action that should be:&#60;/p&#62;
&#60;p&#62;method=&#34;POST&#34; action=&#34;https://www.vcs.co.za/vvonline/ccform.asp&#34;&#60;/p&#62;
&#60;p&#62;I looked through the forums, but can't find a definitive answer.&#60;br /&#62;
Your help will be greatly appreciated!&#60;/p&#62;
&#60;p&#62;(Obviously i will have to do some price calculations also - any indication of how far v1.5 is from public release?)
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
