<?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: Populating a form</title>
		<link>https://legacy.forums.gravityhelp.com/topic/populating-a-form</link>
		<description>Gravity Support Forums Topic: Populating a form</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 23:23:08 +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/populating-a-form" rel="self" type="application/rss+xml" />

		<item>
			<title>Alex Cancado on "Populating a form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populating-a-form#post-1210</link>
			<pubDate>Tue, 27 Oct 2009 08:13:53 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">1210@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Nice! I am glad you got it to work.&#60;br /&#62;
Thanks for the support.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Raintrader on "Populating a form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populating-a-form#post-1207</link>
			<pubDate>Tue, 27 Oct 2009 06:10:22 +0000</pubDate>
			<dc:creator>Raintrader</dc:creator>
			<guid isPermaLink="false">1207@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yeeha that worked perfect.&#60;br /&#62;
i already tried it before with $post-&#38;gt;ID as iam using the form embeded in the posts.&#60;br /&#62;
But i didnt tried the &#34;global $post;&#34; thingy.&#60;/p&#62;
&#60;p&#62;Thanx for helping me out.&#60;/p&#62;
&#60;p&#62;GF is an absolute cool tool for my needs.&#60;br /&#62;
Cant wait the next release and the feautures that about to come.&#60;/p&#62;
&#60;p&#62;Without beeing too demanding i would love to see the following in GF somewhre in Times.&#60;/p&#62;
&#60;p&#62;# the possibility to populate an external database (mysql /sqlite ) directly from Gforms.&#60;br /&#62;
   I know its already possible now thru passing fields via Url.&#60;br /&#62;
What im looking for is to have an external Client Database that holds their Contact Data as well as the Post Url or Post Id they submitted.&#60;br /&#62;
The Custumer created Post it self will remain in Wordpress Database.&#60;br /&#62;
That way you dont loose all of your Data in case something happens to your Wp installation. Further you could acces the External DB via File Maker (or other DB-Clients) without messing up the WP Database.&#60;/p&#62;
&#60;p&#62;# An Autoincrement Number Field for creating stuff like Custumer ID or Product IDs&#60;/p&#62;
&#60;p&#62;That said thanx again for the excelent support.&#60;/p&#62;
&#60;p&#62;Sascha
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Populating a form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populating-a-form#post-1201</link>
			<pubDate>Mon, 26 Oct 2009 22:08:13 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">1201@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Since your form is embeded in the post, use the following instead:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
&#38;lt;?php add_filter(&#34;gform_notification_email_2&#34;,&#34;route_notification&#34;,10,2);&#60;br /&#62;
function route_notification($email_to,$entry){&#60;br /&#62;
global $post;&#60;br /&#62;
$email_to = get_post_meta($post-&#38;gt;ID,&#34;infomail&#34;,true);&#60;br /&#62;
return $email_to;&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;&#60;/p&#62;
&#60;p&#62;&#60;/code&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Raintrader on "Populating a form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populating-a-form#post-1174</link>
			<pubDate>Mon, 26 Oct 2009 12:35:48 +0000</pubDate>
			<dc:creator>Raintrader</dc:creator>
			<guid isPermaLink="false">1174@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have a form embeded @ the bottom of post.&#60;/p&#62;
&#60;p&#62;Now i would like to read out the custom post field called &#34;infomail&#34; wich i would like to use as the User/Admin Notification &#34;send to&#34;-adress.&#60;/p&#62;
&#60;p&#62;I added the following to my functions.php&#60;/p&#62;
&#60;pre&#62;
&#38;lt;?php add_filter(&#34;gform_notification_email_2&#34;,&#34;route_notification&#34;,10,2);
function route_notification($email_to,$entry){
$email_to = get_post_meta($_GET[&#34;post_id&#34;],&#34;infomail&#34;,true);
return $email_to;
}
?&#38;gt;
&#60;/pre&#62;
&#60;p&#62;since that my Admin notification is no longer sent.&#60;/p&#62;
&#60;p&#62;Any clues ?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Populating a form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populating-a-form#post-1065</link>
			<pubDate>Wed, 21 Oct 2009 11:55:18 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">1065@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sascha,&#60;br /&#62;
I understand what you are trying to do now. It will take a little bit more code, but we still can get it done.&#60;/p&#62;
&#60;p&#62;1- Setup Form A, and get the IDs for all fields you would like to be &#34;sent&#34; to Form B. You can get the Ids by looking at the html source of the form. The li containing the field will have the field id in it's ID attribute. It is formatted like such: &#34;field_FORMID_FIELDID&#34;&#60;/p&#62;
&#60;p&#62;2- Add hidden fields to Form B. One for each field you want to send to the user.&#60;br /&#62;
Setup this hidden fields to &#34;allow field to be populated dynamically&#34; and give it a parameter name (i.e. shoesize)&#60;/p&#62;
&#60;p&#62;3- Add the following code to your functions.php (this will only populate one field. to populate multiple fields, you will need to add this multiple times with the proper values replaced)&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
add_filter(&#34;gform_field_value_shoesize&#34;, &#34;populate_shoesize&#34;);&#60;br /&#62;
function populate_shoesize(){&#60;br /&#62;
    global $post;&#60;br /&#62;
    global $wpdb;&#60;br /&#62;
    $table_name = $wpdb-&#38;gt;prefix . &#34;rg_lead&#34;;&#60;/p&#62;
&#60;p&#62;    //getting the entry id that generated this post&#60;br /&#62;
    $entry_id = $wpdb-&#38;gt;get_var($wpdb-&#38;gt;prepare(&#34;select id from $table_name where post_id=%d&#34;, $post-&#38;gt;ID));&#60;/p&#62;
&#60;p&#62;    $shoesize = &#34;&#34;;&#60;br /&#62;
    if(!empty($entry_id)){&#60;/p&#62;
&#60;p&#62;        //loading the entry with all fields&#60;br /&#62;
        $entry = RGFormsModel::get_lead($entry_id);&#60;/p&#62;
&#60;p&#62;        //getting one of the entry's fields (by ID - The ID can be found by looking at the   form's html source. The input will be formated as &#34;input_ID&#34;).&#60;br /&#62;
        $shoesize = $entry[1]; //The 1 here is the id of the field to be returned. You can get it by looking at the html source of the form.&#60;br /&#62;
    }&#60;/p&#62;
&#60;p&#62;    return $shoesize;&#60;br /&#62;
}&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;In the following line, &#34;shoesize&#34; should be replaced with the parameter name you gave your hidden field on Form B.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
add_filter(&#34;gform_field_value_shoesize&#34;, &#34;populate_shoesize&#34;);&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;AND in the following line, replace 1 with your field id from Form A&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
$shoesize = $entry[1];&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Now you can setup your notification using this hidden fields and the values will be sent to the user.&#60;/p&#62;
&#60;p&#62;NOTE: This is method performs a couple of queries for each field you have to populate, so it may not be a great idea to use this method if you are loading a bunch of fields. You probably won't notice any performance issues if you have less than 10 fields, I don't think.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Raintrader on "Populating a form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populating-a-form#post-1054</link>
			<pubDate>Wed, 21 Oct 2009 09:43:04 +0000</pubDate>
			<dc:creator>Raintrader</dc:creator>
			<guid isPermaLink="false">1054@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes i really enjoy GF,&#60;/p&#62;
&#60;p&#62;with this method i have to use 2 forms tied toghether as you mentioned.&#60;br /&#62;
But i need them kind of independent form each other.&#60;/p&#62;
&#60;p&#62;Example&#60;/p&#62;
&#60;p&#62;User  A submitts a Post with Form A&#60;br /&#62;
includig Tilte,Post,custom Fields as well as Contact,Shoesize,...(non post fileds)&#60;br /&#62;
On submit the Post is created&#60;/p&#62;
&#60;p&#62;When this Post is displayed on my Site there is FORM B attached.&#60;br /&#62;
So when a visitor to my Site submits Form B i want it to send an email including values that User A provided (Contact,Shoesize) and wich are not stored with the Post.&#60;/p&#62;
&#60;p&#62;In other Words how can i acces the Form Entires User A made to use them in Form B without directly passing field from Form A to Form B.&#60;/p&#62;
&#60;p&#62;I guess i need to establish a kind of Post ID - Entry Id Realtion.&#60;/p&#62;
&#60;p&#62;Hope that made Intenion a bit more clear ( always hard to explain things in an other Language)&#60;/p&#62;
&#60;p&#62;Sascha
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Populating a form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populating-a-form#post-1053</link>
			<pubDate>Wed, 21 Oct 2009 09:21:39 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">1053@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Raintrader,&#60;/p&#62;
&#60;p&#62;#1 Yes you are right.&#60;/p&#62;
&#60;p&#62;#2 Yes, you can do that. To do that, you will basically need to string two forms together. The first form's confirmation page will be configured to go the the second page and pass some query string values. The second form will be configured to accept those query string values to populate the fields.&#60;/p&#62;
&#60;p&#62;Sounds like you are having some fun with Gravity Forms.&#60;br /&#62;
Let me know how it turns out.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Raintrader on "Populating a form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populating-a-form#post-1051</link>
			<pubDate>Wed, 21 Oct 2009 09:08:16 +0000</pubDate>
			<dc:creator>Raintrader</dc:creator>
			<guid isPermaLink="false">1051@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanx Alex that made things more clear.&#60;/p&#62;
&#60;p&#62;Just two more questions : &#60;/p&#62;
&#60;p&#62;#1&#60;/p&#62;
&#60;p&#62;if i embed the form in every Post is it possible to get a custom field from the actual diplayed Post with the method above.&#60;br /&#62;
If so i dont need to pass the Post ID.&#60;br /&#62;
Am i right ??&#60;/p&#62;
&#60;p&#62;#2&#60;br /&#62;
Another Senario&#60;/p&#62;
&#60;p&#62;is it possible to get acces to non post values (e.g not Customfileds)a user submitted using Form A and use them to populate fileds in Form B.&#60;/p&#62;
&#60;p&#62;Thanks a lot
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Populating a form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populating-a-form#post-1045</link>
			<pubDate>Wed, 21 Oct 2009 08:34:36 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">1045@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Raintrader,&#60;br /&#62;
The filter will basically let you dynamically change the email that the notification will be sent to. In this case, the email is stored in a the post's &#60;a href=&#34;http://codex.wordpress.org/Custom_Fields&#34;&#62;custom field&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;You can add the code snippet above to the functions.php file inside your theme folder (i.e /wp-content/themes/your_theme/functions.php).&#60;/p&#62;
&#60;p&#62;As Carl pointed out, you will need to replace some values in the code snippet. The Form Id (17 in my example) and the custom field key (&#34;CUSTOM_FIELD_KEY&#34; in my example).&#60;/p&#62;
&#60;p&#62;Good Luck!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Raintrader on "Populating a form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populating-a-form#post-1041</link>
			<pubDate>Wed, 21 Oct 2009 06:35:45 +0000</pubDate>
			<dc:creator>Raintrader</dc:creator>
			<guid isPermaLink="false">1041@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Alex,&#60;/p&#62;
&#60;p&#62;i would like to to the same thing.&#60;br /&#62;
could you please explain how the filter thing works.&#60;br /&#62;
Where do i have to enter that code you posted??
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
