<?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: Pass a variable to the form via $_POST</title>
		<link>https://legacy.forums.gravityhelp.com/topic/pass-a-variable-to-the-form-via-_post</link>
		<description>Gravity Support Forums Topic: Pass a variable to the form via $_POST</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 20:13:34 +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/pass-a-variable-to-the-form-via-_post" rel="self" type="application/rss+xml" />

		<item>
			<title>Marty Martin on "Pass a variable to the form via $_POST"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pass-a-variable-to-the-form-via-_post#post-4034</link>
			<pubDate>Tue, 16 Mar 2010 11:54:57 +0000</pubDate>
			<dc:creator>Marty Martin</dc:creator>
			<guid isPermaLink="false">4034@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks, I've got it working now.  Cheers!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Pass a variable to the form via $_POST"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pass-a-variable-to-the-form-via-_post#post-4030</link>
			<pubDate>Tue, 16 Mar 2010 11:10:34 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">4030@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Gravity Forms fields are not automatically pre-populated via a post.  &#60;/p&#62;
&#60;p&#62;They can be pre-populated either by PHP using an API hook or by passing data to them via query string and turning on dynamic field population.&#60;/p&#62;
&#60;p&#62;You would either have to add some PHP to take advantage of available API hooks to the page the form appears on.  You can see this thread for an example:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forum.gravityhelp.com/topic/correct-syntax-to-populate-fields-dynamically&#34; rel=&#34;nofollow&#34;&#62;http://forum.gravityhelp.com/topic/correct-syntax-to-populate-fields-dynamically&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Or you would have to change your mini-form to use GET instead of POST and pass the values to the form via the query string.  &#60;/p&#62;
&#60;p&#62;Either way you have to set the fields you want to populate dynamically as being able to be populated dynamically by editing those fields in the form builder, going to the advanced tab and turning on dynamic data population.  You will then have to give the fields a parameter name.  If you are passing data to them via the querystring this is the name you would use to pass the data to them (ex. firstname=XXXX&#38;amp;lastname=XXXX you would have to give those fields the parameter values of firstname and lastname).
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Marty Martin on "Pass a variable to the form via $_POST"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pass-a-variable-to-the-form-via-_post#post-4022</link>
			<pubDate>Tue, 16 Mar 2010 09:20:48 +0000</pubDate>
			<dc:creator>Marty Martin</dc:creator>
			<guid isPermaLink="false">4022@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;So that's basically what I'm trying to do and from the pre-sales language it looks like I should be able to do it but I can't find any instructions (I'm smart so if they exist point me to them ;o) or other posts in the forum about it.&#60;/p&#62;
&#60;p&#62;I have a mini-form that I set up that posts to the page with the gravity form and I have the values of 3 form fields I'm trying to pass. Let's just talk about First name and Last name.&#60;/p&#62;
&#60;p&#62;I have under &#34;Advanced&#34; on the name field, in the Field Parameter Name boxes the following-&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$_POST[&#38;#39;first_name&#38;#39;]
$_POST[&#38;#39;last_name&#38;#39;]&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And my form is-&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;form id=&#38;quot;short_form&#38;quot; action=&#38;quot;http://foo.com/subscribe&#38;quot; method=&#38;quot;post&#38;quot;&#38;gt;
&#38;lt;ul class=&#38;quot;form_row&#38;quot;&#38;gt;
            	&#38;lt;li class=&#38;quot;form_label&#38;quot;&#38;gt;First Name&#38;lt;/li&#38;gt;
                &#38;lt;li class=&#38;quot;form_field&#38;quot;&#38;gt;&#38;lt;input type=&#38;quot;text&#38;quot; name=&#38;quot;first_name&#38;quot; size=&#38;quot;20&#38;quot; value=&#38;quot;&#38;quot; /&#38;gt;&#38;lt;/li&#38;gt;
            &#38;lt;/ul&#38;gt;
            &#38;lt;ul class=&#38;quot;form_row&#38;quot;&#38;gt;
            	&#38;lt;li class=&#38;quot;form_label&#38;quot;&#38;gt;Last Name&#38;lt;/li&#38;gt;
                &#38;lt;li class=&#38;quot;form_field&#38;quot;&#38;gt;&#38;lt;input type=&#38;quot;text&#38;quot; name=&#38;quot;last_name&#38;quot; size=&#38;quot;20&#38;quot; value=&#38;quot;&#38;quot; /&#38;gt;&#38;lt;/li&#38;gt;
            &#38;lt;/ul&#38;gt;
            &#38;lt;ul class=&#38;quot;form_row&#38;quot;&#38;gt;
            	&#38;lt;li class=&#38;quot;form_label&#38;quot;&#38;gt;Email Address&#38;lt;/li&#38;gt;
                &#38;lt;li class=&#38;quot;form_field&#38;quot;&#38;gt;&#38;lt;input type=&#38;quot;text&#38;quot; name=&#38;quot;email&#38;quot; size=&#38;quot;20&#38;quot; value=&#38;quot;&#38;quot; /&#38;gt;&#38;lt;/li&#38;gt;
            &#38;lt;/ul&#38;gt;
            &#38;lt;ul class=&#38;quot;form_row&#38;quot;&#38;gt;
            	&#38;lt;li class=&#38;quot;form_label&#38;quot;&#38;gt;&#38;amp;nbsp;&#38;lt;/li&#38;gt;
                &#38;lt;li class=&#38;quot;form_field&#38;quot;&#38;gt;&#38;lt;input type=&#38;quot;submit&#38;quot; value=&#38;quot;Submit&#38;quot; name=&#38;quot;submit&#38;quot; /&#38;gt;&#38;lt;/li&#38;gt;
            &#38;lt;/ul&#38;gt;
&#38;lt;/form&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Am I missing something here?  When I get to my gravity form onsubmit of this form, the gravity form fields are blank.&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
