<?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: Pulling Affiliate Plugin ID into Hidden form Field</title>
		<link>https://legacy.forums.gravityhelp.com/topic/pulling-affiliate-plugin-id-into-hidden-form-field</link>
		<description>Gravity Support Forums Topic: Pulling Affiliate Plugin ID into Hidden form Field</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 20:03:58 +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/pulling-affiliate-plugin-id-into-hidden-form-field" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Pulling Affiliate Plugin ID into Hidden form Field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-affiliate-plugin-id-into-hidden-form-field#post-72511</link>
			<pubDate>Fri, 24 Aug 2012 14:25:45 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">72511@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You probably want to use the gform_field_value_$parameter_name filter to call that Affiliates_Service::get_referrer_id() function from your affiliate plugin&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_field_value_$parameter_name&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_field_value_$parameter_name&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;If you have a hidden field in your form which is set to be populated dynamically (check that box on the advanced tab for your hidden field), and that field has a parameter name of &#34;referrer_id&#34; you will call the filter like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
add_filter(&#38;quot;gform_field_value_referrer_id&#38;quot;, &#38;quot;populate_referrer_id&#38;quot;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Then, you will write a function called &#60;strong&#62;populate_referrer_id&#60;/strong&#62; which will call the Affiliates_Service::get_referrer_id(), maybe like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
add_filter(&#38;#39;gform_field_value_referrer_id&#38;#39;, &#38;#39;populate_referrer_id&#38;#39;);
function populate_referrer_id($value) {
    $referrer_id = Affiliates_Service::get_referrer_id();
    return $referrer_id;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Here is a more verbose example.  You are using the same procedure, but your function value comes from the affiliate plugin's function, not built in WordPress functions.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Dynamically_Populating_the_Post_Author&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Dynamically_Populating_the_Post_Author&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Let us know if that works out for you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>nomadone on "Pulling Affiliate Plugin ID into Hidden form Field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-affiliate-plugin-id-into-hidden-form-field#post-72067</link>
			<pubDate>Wed, 22 Aug 2012 08:22:12 +0000</pubDate>
			<dc:creator>nomadone</dc:creator>
			<guid isPermaLink="false">72067@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'd like to pull an affiliate ID form the affiliate plugin I'm using into the Gravity form on my product page. The Affiliate guy says:&#60;/p&#62;
&#60;p&#62;You can obtain the referrer ID by calling Affiliates_Service::get_referrer_id().&#60;/p&#62;
&#60;p&#62;Uncertain how to go about including this into my Gravity form through a hidden field.&#60;br /&#62;
Any ideas?&#60;/p&#62;
&#60;p&#62;This is at the plugin - &#60;a href=&#34;http://www.itthinx.com/plugins/affiliates/affiliates-shortcodes&#34; rel=&#34;nofollow&#34;&#62;http://www.itthinx.com/plugins/affiliates/affiliates-shortcodes&#60;/a&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
