<?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: Trying to get a form-specific hook to fire</title>
		<link>https://legacy.forums.gravityhelp.com/topic/trying-to-get-a-form-specific-hook-to-fire</link>
		<description>Gravity Support Forums Topic: Trying to get a form-specific hook to fire</description>
		<language>en-US</language>
		<pubDate>Sun, 05 Apr 2026 11:50:36 +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/trying-to-get-a-form-specific-hook-to-fire" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Trying to get a form-specific hook to fire"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/trying-to-get-a-form-specific-hook-to-fire#post-73376</link>
			<pubDate>Thu, 30 Aug 2012 21:46:05 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">73376@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for the update.  Glad you got that working.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Lema on "Trying to get a form-specific hook to fire"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/trying-to-get-a-form-specific-hook-to-fire#post-73292</link>
			<pubDate>Thu, 30 Aug 2012 11:58:01 +0000</pubDate>
			<dc:creator>Chris Lema</dc:creator>
			<guid isPermaLink="false">73292@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You rock. I had both issues - the deprecated code, and the incorrect reference for the entry variable. Now it works. Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Trying to get a form-specific hook to fire"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/trying-to-get-a-form-specific-hook-to-fire#post-73239</link>
			<pubDate>Thu, 30 Aug 2012 07:33:35 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">73239@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;1. gform_post_submission is deprecated.  Please use gform_after_submission instead. &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#34; rel=&#34;nofollow&#34;&#62;Documentation&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;2. Can you check the value of $response to see what it contains?&#60;/p&#62;
&#60;p&#62;3.  Line 5 looks wrong.  The WordPress function &#60;a href=&#34;http://codex.wordpress.org/Function_Reference/get_post&#34; rel=&#34;nofollow&#34;&#62;get_post&#60;/a&#62; is designed to return one post based on the integer value of the post ID.  If you're trying to retrieve the phone number from a form  entry, you probably want it to look like this (assuming the phone number is field 1 in your form):&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$phone = $entry[1];&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Chris Lema on "Trying to get a form-specific hook to fire"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/trying-to-get-a-form-specific-hook-to-fire#post-73212</link>
			<pubDate>Thu, 30 Aug 2012 01:36:24 +0000</pubDate>
			<dc:creator>Chris Lema</dc:creator>
			<guid isPermaLink="false">73212@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm trying to grab the value of a single form field, on a single form, and put it into a remote POST call.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[php]
add_action(&#38;quot;gform_post_submission_4&#38;quot;, &#38;quot;subscribe_textmarks&#38;quot;, 10, 2);
function subscribe_textmarks($entry, $form){

//first, let&#38;#39;s grab the phone number from the form, it&#38;#39;s field 1
$phone = get_post($entry[&#38;quot;1&#38;quot;]);

//now let&#38;#39;s remotely subscribe to textmarks by calling their API via POST
$response = wp_remote_post(&#38;#39;http://help.api2.textmarks.com//Anybody/invite_to_group/&#38;#39;, array(
	&#38;#39;method&#38;#39; =&#38;gt; &#38;#39;POST&#38;#39;,
	&#38;#39;headers&#38;#39; =&#38;gt; array(),
	&#38;#39;body&#38;#39; =&#38;gt; array( &#38;#39;api_key&#38;#39; =&#38;gt; &#38;#39;chrislema_com__72225807&#38;#39;, &#38;#39;tm&#38;#39; =&#38;gt; &#38;#39;WORDPRESS&#38;#39;, &#38;#39;user&#38;#39; =&#38;gt; $phone )
    )
);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You can see by the initial _4 appended to the hook, I was trying to get this to only fire on a specific form.&#60;/p&#62;
&#60;p&#62;When I put in the value, the form submits, I see the thank you text, but nothing seems to get out to the remote server.&#60;/p&#62;
&#60;p&#62;Am I calling this wrong?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
