<?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: Dynamically Populate Based on Post Name</title>
		<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-based-on-post-name</link>
		<description>Gravity Support Forums Topic: Dynamically Populate Based on Post Name</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 04:33:49 +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/dynamically-populate-based-on-post-name" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Dynamically Populate Based on Post Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-based-on-post-name#post-108279</link>
			<pubDate>Wed, 26 Dec 2012 08:47:40 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">108279@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for sharing your code @leepettijohn.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leepettijohn on "Dynamically Populate Based on Post Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-based-on-post-name#post-107872</link>
			<pubDate>Tue, 25 Dec 2012 18:39:06 +0000</pubDate>
			<dc:creator>leepettijohn</dc:creator>
			<guid isPermaLink="false">107872@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for the head start.  Works like a charm and not too much code.  Here is a reference for people later.  Post in your functions.php file&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_render&#38;quot;, &#38;quot;populate_post_name&#38;quot;);
function populate_post_name($form){
	global $post;
	    if($form[&#38;quot;id&#38;quot;] != 2) // Change [2] to the ID of the form you want to use
	       return $form;
		$post_name = get_the_title($post-&#38;gt;ID);
		$form[&#38;quot;fields&#38;quot;][3][&#38;quot;defaultValue&#38;quot;] = $post_name ; //Change [3] to the nth (-1) field you want to populate.
		return $form;

}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Dynamically Populate Based on Post Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-based-on-post-name#post-106194</link>
			<pubDate>Sat, 22 Dec 2012 23:05:00 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">106194@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;There is no easy way to do it. You would have to grab the title using WordPress' built-in functions and using out gform_pre_render push it to the field you want.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_pre_render&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_pre_render&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://codex.wordpress.org/Template_Tags/get_the_title&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Template_Tags/get_the_title&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;All my best!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leepettijohn on "Dynamically Populate Based on Post Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-based-on-post-name#post-106078</link>
			<pubDate>Sat, 22 Dec 2012 17:49:57 +0000</pubDate>
			<dc:creator>leepettijohn</dc:creator>
			<guid isPermaLink="false">106078@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is there a way to dynamically populate a &#34;Single Line Text&#34; field with the name of the post it is inserted into?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
