<?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 Tag: hook - Recent Topics</title>
		<link>https://legacy.forums.gravityhelp.com/tags/hook</link>
		<description>Gravity Support Forums Tag: hook - Recent Topics</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 16:35:56 +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/tags/hook/topics" rel="self" type="application/rss+xml" />

		<item>
			<title>dustin on "Action A PHP Script upon form submission using an external php script"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/action-a-php-script-upon-form-submission-using-an-external-php-script#post-347996</link>
			<pubDate>Thu, 27 Jun 2013 10:47:30 +0000</pubDate>
			<dc:creator>dustin</dc:creator>
			<guid isPermaLink="false">347996@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi I wonder if anyone can help me?&#60;br /&#62;
I've got a call to action gravity form setup on my website where customers can enter their UK postcode and click submit. The user is then re-directed to another gravity form where they can complete their request. I've setup dynamic population so the input entered into form 1 gets populated in the second form.&#60;/p&#62;
&#60;p&#62;For Form 1 - when a user enters data &#38;amp; clicks submit (Before user is directed to form 2)&#60;br /&#62;
Upon submit I would like to action an external php script which would validate the user entry.&#60;/p&#62;
&#60;p&#62;I've tried various filters and actions But I just can't figure out how to action the PHP script.&#60;/p&#62;
&#60;p&#62;Link to form1 &#60;a href=&#34;http://my-insulation.info/&#34; rel=&#34;nofollow&#34;&#62;http://my-insulation.info/&#60;/a&#62; is the main page &#60;/p&#62;
&#60;p&#62;When I input data and click submit I get the following error -There was a problem with your submission. Errors have been highlighted below.&#60;/p&#62;
&#60;p&#62;I'm not a web developer &#38;amp; can't afford to hire one, If someone can offer any assistance I would greatly appreciate it -&#60;/p&#62;
&#60;p&#62;This is what I've done or got -&#60;/p&#62;
&#60;p&#62;//Code is placed in the themes function.php file&#60;br /&#62;
My PHP code can be seen here - &#60;a href=&#34;http://pastebin.com/S9S7dH09&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/S9S7dH09&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Andy on "Help using a Hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-using-a-hook#post-320965</link>
			<pubDate>Thu, 13 Jun 2013 13:43:33 +0000</pubDate>
			<dc:creator>Andy</dc:creator>
			<guid isPermaLink="false">320965@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have an index page which lists all of my events. &#60;/p&#62;
&#60;p&#62;The form is embedded using the shortcode:&#60;/p&#62;
&#60;p&#62;[gravityform id=10 ajax=true description=false title=false]&#60;/p&#62;
&#60;p&#62;Next to each event there is a a URL link &#34;Make a resevation&#34; which calls the gravity form.&#60;/p&#62;
&#60;p&#62;I need to use a hook which will pass the event name to an Admin field in the gravity form. &#60;/p&#62;
&#60;p&#62;How can i do this? Presumably by grabbing the title i define somehow on the &#34;Make a reservation&#34; URL. &#60;/p&#62;
&#60;p&#62;many thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>roikles on "Hooking into gravity forms entries to generate word doc"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hooking-into-gravity-forms-entries-to-generator-word-doc#post-307838</link>
			<pubDate>Fri, 07 Jun 2013 04:22:43 +0000</pubDate>
			<dc:creator>roikles</dc:creator>
			<guid isPermaLink="false">307838@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi there,&#60;/p&#62;
&#60;p&#62;I'm currently trying to make a mod that uses PHPDoc to generate a document using Gravity Forms data. &#60;/p&#62;
&#60;p&#62;My question is how do I hook into the entries of a form from a non-template .php WordPress file?&#60;/p&#62;
&#60;p&#62;So far I've been able to add javascript into the WP-Admin Form Entries list to insert a 'view Docx' link and i've hooked into WordPress fine.&#60;/p&#62;
&#60;p&#62;Any advice or guidance will be greatly appreciated.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/jaq3cdW0&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/jaq3cdW0&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Ash.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>batterystudios on "BUG REPORT : Filtering date with gform_post_data not working"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/bug-report-filtering-date-with-gform_post_data-not-working#post-308847</link>
			<pubDate>Fri, 07 Jun 2013 19:39:05 +0000</pubDate>
			<dc:creator>batterystudios</dc:creator>
			<guid isPermaLink="false">308847@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have created a filter to modify the post date, using the method described at &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_post_data&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_post_data&#60;/a&#62; *&#60;/p&#62;
&#60;p&#62;however in the latest version of GF I find that the changed date gets overriddden when the post is updated (see forms_model.php - line 2217)  &#60;/p&#62;
&#60;p&#62;In order to remedy it, I had to add &#60;code&#62;$post-&#38;gt;edit_date = &#38;#39;false&#38;#39;;&#60;/code&#62; at line 2215 so that changes to the date would not be affected.&#60;/p&#62;
&#60;p&#62;please let me know if this will be remedied in the next update, either by adding the code I mention above, or by adding a filter to that new post object, prior to the post being updated.&#60;/p&#62;
&#60;p&#62;Here is a screencast of the problem: &#60;a href=&#34;http://screencast.com/t/FeFt3m4a&#34; rel=&#34;nofollow&#34;&#62;http://screencast.com/t/FeFt3m4a&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;* Also, the location of Gform_post_data hook is incorrectly shown in the &#34;Source Code&#34; section of the documentation link above.  It should read 'forms_model.php' *not*  'form_display.php'
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dfrayne on "Authorize.net eCheck option"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/authorizenet-echeck-option#post-80651</link>
			<pubDate>Fri, 12 Oct 2012 17:33:14 +0000</pubDate>
			<dc:creator>dfrayne</dc:creator>
			<guid isPermaLink="false">80651@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I am setting up a donation form where donors can use either Paypal or Authorize.net. Is it possible for Authorize.net donors to pay via eCheck instead of credit card?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Briteweb on "Filtering the values for the address field type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/filtering-the-values-for-the-address-field-type#post-246747</link>
			<pubDate>Fri, 10 May 2013 18:07:22 +0000</pubDate>
			<dc:creator>Briteweb</dc:creator>
			<guid isPermaLink="false">246747@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey guys,&#60;/p&#62;
&#60;p&#62;I'm currently adding default values for all sorts of fields using the great hooks you provide for most input types. However I'm currently trying to limit the address 'province' dropdown to only 2 provinces (as this particular 'thing' is limited to those 2 provinces). I've looked through the core files and can't see any filters which would allow for that. I've tried using the gform_pre_render hook (which works great for normal dropdowns) and the gform_field_value_* hook without any success. &#60;/p&#62;
&#60;p&#62;I can see that for an address the setup is slightly different (As you'd expect) as the $field has an [inputs] part of the array. I've tried doing something like $field['inputs'][3]['choices'] = array( 'text' =&#38;gt; 'test', 'value' =&#38;gt; 'testval' ) within the gform_pre_render hook but to no avail.&#60;/p&#62;
&#60;p&#62;Am I missing something?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;public function auto_populate_address_province( $form )
		{

			foreach( $form[&#38;#39;fields&#38;#39;] as &#38;amp;$field )
			{

				if( $field[&#38;#39;type&#38;#39;] != &#38;#39;address&#38;#39; &#124;&#124; strpos( $field[&#38;#39;cssClass&#38;#39;], &#38;#39;slide2-address&#38;#39; ) === false )
            		continue;

            	//gForms expects an array with &#38;#39;text&#38;#39;, &#38;#39;value&#38;#39; and &#38;#39;isSelected&#38;#39; as keys
				$choices = array( array( &#38;#39;text&#38;#39; =&#38;gt; &#38;#39;test&#38;#39;, &#38;#39;value&#38;#39; =&#38;gt; &#38;#39;value&#38;#39; ), array( &#38;#39;text&#38;#39; =&#38;gt; &#38;#39;test2&#38;#39;, &#38;#39;value&#38;#39; =&#38;gt; &#38;#39;value2&#38;#39; ) );

				$field[&#38;#39;inputs&#38;#39;][3][&#38;#39;choices&#38;#39;] = $choices;

			}

			return $form;

		}/* auto_populate_address_province() */&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>webheadllc on "Possible bug in using gform_after_save_form hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/possible-bug-in-using-gform_after_save_form-hook#post-246797</link>
			<pubDate>Fri, 10 May 2013 19:41:10 +0000</pubDate>
			<dc:creator>webheadllc</dc:creator>
			<guid isPermaLink="false">246797@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I'm currently using the gform_after_save_form hook but I'm not getting the changed values unless I save it twice.  I investigated the issue and it looks like the &#60;code&#62;RGFormsModel::get_form_meta($id);&#60;/code&#62; in form_detail.php is returning a cached form meta.&#60;/p&#62;
&#60;p&#62;Steps to reproduce:&#60;br /&#62;
1) Add a hook for gform_after_save_form.  code something so you can see the title of the saved form.&#60;br /&#62;
2) Open an existing form.&#60;br /&#62;
3) change the title.&#60;br /&#62;
4) save it.&#60;br /&#62;
5) The code from step 1 outputs the old title (at least for me anyway).&#60;/p&#62;
&#60;p&#62;Please let me know if you can reproduce this or if something could be wrong with my setup/environment.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>webheadllc on "Bug in using gform_after_save_form hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/bug-in-using-gform_after_save_form-hook#post-258381</link>
			<pubDate>Fri, 17 May 2013 19:40:32 +0000</pubDate>
			<dc:creator>webheadllc</dc:creator>
			<guid isPermaLink="false">258381@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I'm using gravityforms v1.7.3 and have reproduced the issue on a clean wordpress install. To see what is wrong simply create a form, add the function below to the default theme functions file, update the form title through the UI and you'll see that the var dump is the old title. Please help.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function my_save_form($form) {
var_dump($form[&#38;#39;title&#38;#39;]);
}
add_action( &#38;#39;gform_after_save_form&#38;#39;, &#38;#39;my_save_form&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>magicdust on "Change Notification {admin_email} for From Address"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-notification-admin_email-for-from-address#post-232014</link>
			<pubDate>Wed, 01 May 2013 08:27:52 +0000</pubDate>
			<dc:creator>magicdust</dc:creator>
			<guid isPermaLink="false">232014@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;We set up gravity forms for a lot of our clients, however our normal Wordpress install the client usually uses an editor-level account and we handle the admin account. This is to prevent our often very low-tech clients from doing things that will break their site.&#60;/p&#62;
&#60;p&#62;The problem we're having is that although we do try to tell them not to, they're often leaving the From and To fields in their Notifications as {admin_email}. This is a problem because that email address is our email address, not theirs.&#60;/p&#62;
&#60;p&#62;I've looked up the gform_notification hook, and got it working so that if the notification has the text {admin_email} it replaces it with the email address of their account.&#60;/p&#62;
&#60;p&#62;The problem is that this doesn't seem to work on the From field. Is there a way in Gravity Forms to filter the From email address, so that I can replace it with theirs if they haven't manually changed it in the Form Settings?&#60;/p&#62;
&#60;p&#62;I'll be using 1.7 only from now on, so 1.7 filters are fine.&#60;/p&#62;
&#60;p&#62;My code so far (in a custom plugin for stuff like this):&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function gform_notification_email( $notification, $email, $form) {
	$editor = get_userdata( 2 );
	$notification = str_replace( &#38;#39;{admin_email}&#38;#39;, $editor-&#38;gt;user_email, $notification);
	return $notification;
}

add_filter(&#38;#39;gform_notification&#38;#39;, &#38;#39;gform_notification_email&#38;#39;, 10, 3);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Jacob @ magicdust&#60;/p&#62;
&#60;p&#62;Edit: Sorry, I should note, that simply doing this:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$notification[&#38;#39;from&#38;#39;] = $editor-&#38;gt;user_email;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Works just fine. However this will overwrite it even if the user changes it. I'd like to preserve whatever's in there, unless it's {admin_email}. Problem is it looks like that even though {admin_email} is what's in the notification settings, it's not actually included in the $notifications array.&#60;/p&#62;
&#60;p&#62;Edit: Ok, It seems just checking if $notification['from] == '' is working. Is there anything wrong with this approach? Are there any other places the admin email address is used I should watch out for?&#60;/p&#62;
&#60;p&#62;I know I've pretty much solved the problem... already, but I'm not super-confident in my solution. So if there's a better way, I'd love to hear it.&#60;/p&#62;
&#60;p&#62;Cheers!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>martyspellerberg on "Dynamic checkboxes: Not all selections being saved"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamic-checkboxes-not-all-selections-being-saved#post-142706</link>
			<pubDate>Tue, 05 Feb 2013 15:44:22 +0000</pubDate>
			<dc:creator>martyspellerberg</dc:creator>
			<guid isPermaLink="false">142706@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi there, I'm having the same issue as described in this thread:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/not-all-the-selected-values-from-checkboxes-are-being-saved-to-the-database&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/not-all-the-selected-values-from-checkboxes-are-being-saved-to-the-database&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Here's the code I'm using:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastie.org/6073683&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/6073683&#60;/a&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
