<?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: Hidden Field and Custom Action</title>
		<link>https://legacy.forums.gravityhelp.com/topic/hidden-field-and-custom-action</link>
		<description>Gravity Support Forums Topic: Hidden Field and Custom Action</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 12:43:19 +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/hidden-field-and-custom-action" rel="self" type="application/rss+xml" />

		<item>
			<title>rvturnage on "Hidden Field and Custom Action"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidden-field-and-custom-action#post-154154</link>
			<pubDate>Mon, 25 Feb 2013 10:06:52 +0000</pubDate>
			<dc:creator>rvturnage</dc:creator>
			<guid isPermaLink="false">154154@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That's what I was afraid of. Thanks Chris.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Hidden Field and Custom Action"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidden-field-and-custom-action#post-153361</link>
			<pubDate>Sun, 24 Feb 2013 01:51:02 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">153361@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Your code is incorrect in that case.  What your code is doing is send a post body field to a 3rd party service.  That's not gong to work.&#60;/p&#62;
&#60;p&#62;If you dump the $entry object in your code, you will see the names of all the fields and the data which was collected.  You can send all those fields to thirdparty.com, if you want, but that is probably not what you mean to do. You probably have specific parameter names the 3rd party is looking for (for example, they probably want to see &#34;name&#34; rather than &#34;input_1_3&#34; or something.&#60;/p&#62;
&#60;p&#62;You will have to map the captured data from the entry to the specific parameter names that your 3rd party service wants to see.&#60;/p&#62;
&#60;p&#62;There is not an easy way to get all fields from all entries on all forms, including new forms, with just one function.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rvturnage on "Hidden Field and Custom Action"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidden-field-and-custom-action#post-153040</link>
			<pubDate>Sat, 23 Feb 2013 09:53:57 +0000</pubDate>
			<dc:creator>rvturnage</dc:creator>
			<guid isPermaLink="false">153040@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;No, I am trying to submit the all the form fields to the third party, without having to manually specify each field in a $body array as Mark was showing in his situation. I need all forms on my site to also submit third party. there are a dozen different forms, all having different fields and field names, and we add new forms on a regular basis. I was hoping to access an existing array containing all of the submitted data when a form is submitted, so that I can  pass that on using one function for all forms on my site.&#60;/p&#62;
&#60;p&#62;Thanks for your assistance.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Hidden Field and Custom Action"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidden-field-and-custom-action#post-152785</link>
			<pubDate>Sat, 23 Feb 2013 02:04:39 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">152785@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This line:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$post = get_post($entry[&#38;quot;post_id&#38;quot;]);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;is returning the full content of a WordPress post, and that is what you are sending to the 3rd party.  Is that what you intended to do?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rvturnage on "Hidden Field and Custom Action"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidden-field-and-custom-action#post-151699</link>
			<pubDate>Thu, 21 Feb 2013 13:37:24 +0000</pubDate>
			<dc:creator>rvturnage</dc:creator>
			<guid isPermaLink="false">151699@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm attempting to do the same thing. However, I want to pass ALL fields, in all my forms, to a third party. Do I still need to specify each form field in the $body array as shown above where mark specifies first_name, last_name, etc.? Or would something like this work:&#60;br /&#62;
&#60;a href=&#34;http://pastie.org/private/yn41kndddzexydjhjorwq&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/private/yn41kndddzexydjhjorwq&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Hidden Field and Custom Action"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidden-field-and-custom-action#post-72125</link>
			<pubDate>Wed, 22 Aug 2012 13:36:37 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">72125@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You should never edit the form_display.php file. All of your hooks and functions go into your theme's functions.php file.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>markroskowske on "Hidden Field and Custom Action"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidden-field-and-custom-action#post-72118</link>
			<pubDate>Wed, 22 Aug 2012 13:23:35 +0000</pubDate>
			<dc:creator>markroskowske</dc:creator>
			<guid isPermaLink="false">72118@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Great that stopped the error.&#60;/p&#62;
&#60;p&#62;Now I'm trying to post after submission to a third party. I want to pass name, phone, and email address.  DO I need to edit this in the form_display.php file?  Here is the code I was going to use.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;gform_after_submission_4&#38;#39;, &#38;#39;post_to_third_party&#38;#39;, 10, 2);
function post_to_third_party($entry, $form) {

    $post_url = &#38;#39;http://s638200148.t.eloqua.com/e/f2&#38;#39;;
    $body = array(
        &#38;#39;first_name&#38;#39; =&#38;gt; $entry[&#38;#39;1.3&#38;#39;],
        &#38;#39;last_name&#38;#39; =&#38;gt; $entry[&#38;#39;1.6&#38;#39;],
        &#38;#39;phone&#38;#39; =&#38;gt; $entry[&#38;#39;2&#38;#39;],
		&#38;#39;email&#38;#39; =&#38;gt; $entry[&#38;#39;3&#38;#39;]
        );

    $request = new WP_Http();
    $response = $request-&#38;gt;post($post_url, array(&#38;#39;body&#38;#39; =&#38;gt; $body));

}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Hidden Field and Custom Action"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidden-field-and-custom-action#post-72109</link>
			<pubDate>Wed, 22 Aug 2012 12:49:33 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">72109@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Looks like you are declaring the same function twice: &#60;a href=&#34;http://www.evernote.com/shard/s212/sh/5ca11f1e-d6e1-4e3c-a1cf-32ca53f54090/8c605e6285ac4595b623817faaa0117c&#34; rel=&#34;nofollow&#34;&#62;Screenshot&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Try changing the second one to match: elqSite so: function elqSite($input, $field, $value, $lead_id, $form_id)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>markroskowske on "Hidden Field and Custom Action"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidden-field-and-custom-action#post-72108</link>
			<pubDate>Wed, 22 Aug 2012 12:47:21 +0000</pubDate>
			<dc:creator>markroskowske</dc:creator>
			<guid isPermaLink="false">72108@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_input&#38;quot;, &#38;quot;tracker&#38;quot;, 10, 5);
function tracker($input, $field, $value, $lead_id, $form_id)
{
      //because this will fire for every form/field, only do it when it is the specific form and field
if ($form_id == 4 &#38;amp;&#38;amp; $field[&#38;quot;id&#38;quot;] == 5)
	{
		$input = &#38;#39;&#38;lt;input type=&#38;quot;hidden&#38;quot; id=&#38;quot;hidTracker&#38;quot; name=&#38;quot;elqFormName&#38;quot; value=&#38;quot;(Unnamed Form 1)&#38;quot;&#38;gt;&#38;#39;;
		return $input;
	}
}
add_filter(&#38;quot;gform_field_input&#38;quot;, &#38;quot;elqSite&#38;quot;, 10, 5);
function tracker($input, $field, $value, $lead_id, $form_id)
{
      //because this will fire for every form/field, only do it when it is the specific form and field
if ($form_id == 4 &#38;amp;&#38;amp; $field[&#38;quot;id&#38;quot;] == 6)
	{
		$input = &#38;#39;&#38;lt;input type=&#38;quot;hidden&#38;quot; id=&#38;quot;elqSiteID&#38;quot; name=&#38;quot;elqFormName&#38;quot; value=&#38;quot;638200148&#38;quot;&#38;gt;&#38;#39;;
		return $input;
	}
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>markroskowske on "Hidden Field and Custom Action"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidden-field-and-custom-action#post-72107</link>
			<pubDate>Wed, 22 Aug 2012 12:45:45 +0000</pubDate>
			<dc:creator>markroskowske</dc:creator>
			<guid isPermaLink="false">72107@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm trying to create two hidden fields.  The first one worked fine.  So I copied it and changed the field id and values.  Now I am getting this error.  Any suggestions?&#60;/p&#62;
&#60;p&#62;Fatal error: Cannot redeclare tracker() (previously declared in /home/showme/public_html/wp-content/themes/rttheme15/functions.php:34) in /home/showme/public_html/wp-content/themes/rttheme15/functions.php on line 53
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
