<?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: Passing data for dynamic population</title>
		<link>https://legacy.forums.gravityhelp.com/topic/passing-data-for-dynamic-population</link>
		<description>Gravity Support Forums Topic: Passing data for dynamic population</description>
		<language>en-US</language>
		<pubDate>Tue, 07 Apr 2026 23:23:10 +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/passing-data-for-dynamic-population" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Passing data for dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/passing-data-for-dynamic-population#post-41373</link>
			<pubDate>Thu, 17 Nov 2011 00:36:05 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">41373@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chuck.  Did you ever send me this form?  I can't find it.  I know we were working on a couple things.  Please export the form as XML and email it to me, with a reference to this topic, and also in the email explain where you're at right now, what you need help with.&#60;/p&#62;
&#60;p&#62;I think we need to know how the data is being stored, what the exact meta_key name is in the database.  Do you have a way to check that?  Screenshot, or a link to the plugin or something?  We need to know that to be able to match it up in the form.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>chucktho on "Passing data for dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/passing-data-for-dynamic-population#post-41271</link>
			<pubDate>Wed, 16 Nov 2011 12:09:09 +0000</pubDate>
			<dc:creator>chucktho</dc:creator>
			<guid isPermaLink="false">41271@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Bump.  Just checking, anything new on this issue?  Thanks, Chuck
&#60;/p&#62;</description>
		</item>
		<item>
			<title>chucktho on "Passing data for dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/passing-data-for-dynamic-population#post-40294</link>
			<pubDate>Mon, 07 Nov 2011 16:54:01 +0000</pubDate>
			<dc:creator>chucktho</dc:creator>
			<guid isPermaLink="false">40294@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chris.  I'm sorry it took this long to see this - it didn't notify me that you had responded.&#60;/p&#62;
&#60;p&#62;In the original form (the one with the company name) the Field Label is &#34;Company Name&#34; - I presume Gravity changes that to company_name somehow.&#60;/p&#62;
&#60;p&#62;I've changed it to company_name on the custom functions file.&#60;/p&#62;
&#60;p&#62;On the form I'm trying to populate dynamically, the Field Label is &#34;Company Name&#34; and the parameter name is company_name.&#60;/p&#62;
&#60;p&#62;It still doesn't work.  Thank you so much for you help and again, I'm sorry it took this long to respond.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Passing data for dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/passing-data-for-dynamic-population#post-38944</link>
			<pubDate>Wed, 26 Oct 2011 00:56:21 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">38944@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Chuck, in the custom_functions.php file you sent me, my code (line 347) still has &#34;company&#34; as the meta key name, not &#34;company_name&#34;.  Is it correct in your version?&#60;/p&#62;
&#60;p&#62;The key needs to be exactly the same in the code and in the form and custom fields.  Let me know before I test further.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Passing data for dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/passing-data-for-dynamic-population#post-38823</link>
			<pubDate>Mon, 24 Oct 2011 22:23:44 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">38823@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm not sure where to put the custom code in a Headway theme.  is there any code in that functions file that you are sure IS being executed?  That would help determine if it's in the correct place.&#60;/p&#62;
&#60;p&#62;This is correct: &#34;Allow field to be populated dynamically&#34;&#34;&#60;/p&#62;
&#60;p&#62;And this is correct: &#34;company_name&#34; and is in the wp_usermeta table.&#60;/p&#62;
&#60;p&#62;If you can export the two forms as XML and email them to me &#60;a href=&#34;mailto:chris@rocketgenius.com&#34;&#62;chris@rocketgenius.com&#60;/a&#62; , I can install them and see if I made a mistake in the code, or if I can get it working.&#60;/p&#62;
&#60;p&#62;Also, a copy of your function.php (or whatever the name is) where you pasted this code.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>chucktho on "Passing data for dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/passing-data-for-dynamic-population#post-38803</link>
			<pubDate>Mon, 24 Oct 2011 15:55:32 +0000</pubDate>
			<dc:creator>chucktho</dc:creator>
			<guid isPermaLink="false">38803@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you.  Its not working, but it may be me - I'm not a coder.  I'm using Headway 2.103.  It has a &#34;main&#34; custom_functions.php file and another one for each sub-site.  I've pasted the above code in both.  The &#34;main&#34; custom_functions.php had examples only so I pasted the code at the bottom after the examples (which are commented out).  The one for the sub-site has code.  I pasted your code at the bottom.  On the form, I've checked &#34;Allow field to be populated dynamically&#34; and for the Parameter Name I've entered &#34;company_name&#34;.  I've checked in wp_usermeta and the meta_key &#34;company_name&#34; exists and has a value.  Any idea what I'm doing wrong?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Passing data for dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/passing-data-for-dynamic-population#post-38654</link>
			<pubDate>Sat, 22 Oct 2011 13:28:44 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">38654@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chuck.  Sounds like you need to grab the company information which is stored with the user meta for the logged in user.  It does not sound like the visitor to form B is coming directly from form A, so you will need to determine the logged in user, then grab their meta information.  Try something like this in your theme's functions.php:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
add_filter(&#38;#39;gform_field_value_company&#38;#39;, &#38;#39;populate_company&#38;#39;);
function populate_company($company) {
	if (is_user_logged_in()) {
		// if the user is logged in, get the ID and grab the value of the usermeta value for company
		// change the &#38;#39;company&#38;#39; to the meta_key value where the company information is stored
		$company = get_user_meta($current_user-&#38;gt;ID, &#38;#39;company&#38;#39;, TRUE);
	}
	else {
		$company = &#38;#39;&#38;#39;;
	}
	return $company;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This assumes that the field in form B that holds the company name is set up to allow it to be populated dynamically, and the parameter name is &#34;company&#34;.  It also assumes the company information is stored in the user meta table with the meta_key of &#34;company&#34;.  If not, in either case, you will need to change the code above.&#60;/p&#62;
&#60;p&#62;Let us know if you need more help.  Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Passing data for dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/passing-data-for-dynamic-population#post-38498</link>
			<pubDate>Fri, 21 Oct 2011 01:26:19 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">38498@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chuck.  I'll give you a hand with this on Friday.  Thanks for your patience.&#60;/p&#62;
&#60;p&#62;--Chris
&#60;/p&#62;</description>
		</item>
		<item>
			<title>chucktho on "Passing data for dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/passing-data-for-dynamic-population#post-38435</link>
			<pubDate>Thu, 20 Oct 2011 11:18:00 +0000</pubDate>
			<dc:creator>chucktho</dc:creator>
			<guid isPermaLink="false">38435@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you help to write a query or shortcode to gather information?&#60;/p&#62;
&#60;p&#62;Here's what I'm trying to accomplish:&#60;br /&#62;
Form A has a Company field and it uses the User Registration add-on..&#60;br /&#62;
Form B has a Company field. I'd like to populate the Company Field in Form B with the Company Information from Form A. Users of Form B are logged in users. I'm using Insert Variable to populate the email based upon the user being logged in and that's working fine - I am presuming that means that somehow I can populate the logged in user's Company information.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>chucktho on "Passing data for dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/passing-data-for-dynamic-population#post-38352</link>
			<pubDate>Wed, 19 Oct 2011 16:13:01 +0000</pubDate>
			<dc:creator>chucktho</dc:creator>
			<guid isPermaLink="false">38352@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;As I re-read the page referenced above, I'm not sure that's the best way to go.  It looks like it would eliminate the option of sending a confirmation to the user for the first form.&#60;/p&#62;
&#60;p&#62;Here's what I'm trying to accomplish:&#60;br /&#62;
Form A has a Company field and it uses the User Registration add-on..&#60;br /&#62;
Form B has a Company field.  I'd like to populate the Company Field in Form B with the Company Information from Form A.  Users of Form B are logged in users.  I'm using Insert Variable to populate the email based upon the user being logged in and that's working fine - I am presuming that means that somehow I can populate the logged in user's Company information.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
