<?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: 1.5RC4: $form[&#039;id&#039;])  not available?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/15rc4-formid-not-available</link>
		<description>Gravity Support Forums Topic: 1.5RC4: $form[&#039;id&#039;])  not available?</description>
		<language>en-US</language>
		<pubDate>Tue, 07 Apr 2026 19:59:47 +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/15rc4-formid-not-available" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "1.5RC4: $form[&#039;id&#039;])  not available?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/15rc4-formid-not-available#post-18797</link>
			<pubDate>Thu, 17 Feb 2011 12:10:50 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">18797@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@STB Yes, I misread your initial post.  There are actually 2 different hooks in Gravity Forms that have similar names:&#60;/p&#62;
&#60;p&#62;gform_pre_submission&#60;br /&#62;
Use this hook to perform actions after form validation, but before sending notifications and storing the entry data.&#60;/p&#62;
&#60;p&#62;gform_pre_submission_filter&#60;br /&#62;
Use this hook to manipulate the Form Object before sending notifications and storing entry data.&#60;/p&#62;
&#60;p&#62;Glad you got it working and I could point you in the right direction, at least with the _ID piece of the puzzle :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>STB on "1.5RC4: $form[&#039;id&#039;])  not available?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/15rc4-formid-not-available#post-18780</link>
			<pubDate>Thu, 17 Feb 2011 08:19:17 +0000</pubDate>
			<dc:creator>STB</dc:creator>
			<guid isPermaLink="false">18780@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Update:&#60;/p&#62;
&#60;p&#62;I posted a bit too early above.&#60;/p&#62;
&#60;p&#62;After some fiddling around some more , this is what worked for me in the end.&#60;br /&#62;
&#60;code&#62;add_action(&#38;quot;gform_pre_submission_filter_1&#38;quot;, &#38;quot;update_autoresponder&#38;quot;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;This lets me change the autoresponder fields for form1 while not altering them on form2, form3 etc.&#60;/p&#62;
&#60;p&#62;So, the filter I need *is* called gform_pre_submission_filter_ID, not gform_pre_submission_ID&#60;br /&#62;
(See also this codesnippet from David Smith &#60;a href=&#34;http://www.gravityhelp.com/forums/topic/tell-a-friend-form-query)&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/tell-a-friend-form-query)&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>STB on "1.5RC4: $form[&#039;id&#039;])  not available?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/15rc4-formid-not-available#post-18777</link>
			<pubDate>Thu, 17 Feb 2011 06:37:12 +0000</pubDate>
			<dc:creator>STB</dc:creator>
			<guid isPermaLink="false">18777@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Awesome. Thanks for the super fast reply and explanation Carl!&#60;br /&#62;
That did the trick, it's working now.&#60;/p&#62;
&#60;p&#62;I will keep spreading the word about your great plugin + excellent service.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "1.5RC4: $form[&#039;id&#039;])  not available?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/15rc4-formid-not-available#post-18757</link>
			<pubDate>Wed, 16 Feb 2011 21:45:05 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">18757@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;First the filter you are trying to use is called gform_pre_submission, not gform_pre_submission_filter.&#60;/p&#62;
&#60;p&#62;Second, the code you have in place is going to execute for all forms because you aren't applying it to a specific form id. If you it to run just for one form id, you need to change your code.&#60;/p&#62;
&#60;p&#62;Change this:&#60;/p&#62;
&#60;p&#62;add_action(&#34;gform_pre_submission_filter&#34;, &#34;update_autoresponder&#34;);&#60;/p&#62;
&#60;p&#62;To this:&#60;/p&#62;
&#60;p&#62;add_action(&#34;gform_pre_submission_ID&#34;, &#34;update_autoresponder&#34;);&#60;/p&#62;
&#60;p&#62;Replace the ID appended to the end of gform_pre_submission with the ID of the form you want to customize.&#60;/p&#62;
&#60;p&#62;You would either use gform_pre_submission to apply the change to all forms, or gform_pre_submission_ID with the id of your form to apply it to a specific form.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>STB on "1.5RC4: $form[&#039;id&#039;])  not available?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/15rc4-formid-not-available#post-18748</link>
			<pubDate>Wed, 16 Feb 2011 20:07:42 +0000</pubDate>
			<dc:creator>STB</dc:creator>
			<guid isPermaLink="false">18748@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I got some custom code working allright with a filter,&#60;br /&#62;
but now I only want it to work on form number 1.&#60;/p&#62;
&#60;p&#62;So I added this to the theme's functions.php:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_pre_submission_filter&#38;quot;, &#38;quot;update_autoresponder&#38;quot;);

if($form[&#38;#39;id&#38;#39;] != 1) return $form; //only use on form1 else return

function update_autoresponder($form) {

do something
}

// return the modified form
return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The code should thus only run on form1, but instead it is also run on form2, form3 etc.&#60;/p&#62;
&#60;p&#62;Next, for debug purposes, I changed the code to the following for debug purposes:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_pre_submission_filter&#38;quot;, &#38;quot;update_autoresponder&#38;quot;);

if($form[&#38;#39;id&#38;#39;] != 1) return $form; //only use on form1 else return

function update_autoresponder($form) {

return $form; // &#38;lt;-- added new line, to stop processing rest of the code regardless of $form[&#38;#39;id&#38;#39;]

do something
}

// return the modified form
return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This did indeed result in the added custom code to be skipped.&#60;/p&#62;
&#60;p&#62;Next I tried switching back from 1.5RC4 to 1.4,&#60;br /&#62;
and I used the orignial code, as posted above here.&#60;br /&#62;
And  things worked as expexted as well, only performing the custom code for form 1.&#60;/p&#62;
&#60;p&#62;I cant figure out what is wrong here... but Im beginning to  think that the $form object, or the $form['id'] array is not globally available in 1.5RC4.&#60;/p&#62;
&#60;p&#62;Any help would be much appreciated.&#60;br /&#62;
Site URL + admin login available on  request per email (mailaddress filled out in my profile)
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
