<?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: Pre-populate forms based on Hubspot cookie</title>
		<link>https://legacy.forums.gravityhelp.com/topic/pre-populate-forms-based-on-hubspot-cookie</link>
		<description>Gravity Support Forums Topic: Pre-populate forms based on Hubspot cookie</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 01:23:04 +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/pre-populate-forms-based-on-hubspot-cookie" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "Pre-populate forms based on Hubspot cookie"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pre-populate-forms-based-on-hubspot-cookie#post-99316</link>
			<pubDate>Wed, 05 Dec 2012 17:53:11 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">99316@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for posting this. I hope someone finds it helpful. You can use cookies set from nearly anything to help pre-populate forms as long as you know the data stored in that cookie.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Caleb44 on "Pre-populate forms based on Hubspot cookie"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pre-populate-forms-based-on-hubspot-cookie#post-99239</link>
			<pubDate>Wed, 05 Dec 2012 12:05:39 +0000</pubDate>
			<dc:creator>Caleb44</dc:creator>
			<guid isPermaLink="false">99239@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thought I would post this as it was pretty simple and potentially useful to anybody else using Hubspot and Gravity Forms.  This is an easy way to pre-populate Gravity Forms with Hubspot data based on the user's Hubspot cookie.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$cookie = $_COOKIE[&#38;quot;hubspotutk&#38;quot;];

$url = &#38;quot;http://api.hubapi.com/contacts/v1/contact/utk/&#38;quot;.$cookie.&#38;quot;/profile?hapikey=YOUR_HUBSPOT_API_KEY&#38;quot;;
	$data = file_get_contents($url);
	$data = json_decode($data);
	global $firstname;

	$firstname = $data-&#38;gt;properties-&#38;gt;firstname-&#38;gt;value;

add_filter(&#38;#39;gform_field_value_fname&#38;#39;, &#38;#39;fname_population_function&#38;#39;);
function fname_population_function($value){

	global $firstname;
	return $firstname;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
