<?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: Populate a field with a custom post type title</title>
		<link>https://legacy.forums.gravityhelp.com/topic/populate-a-field-with-a-custom-post-type-title</link>
		<description>Gravity Support Forums Topic: Populate a field with a custom post type title</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 09:06:21 +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/populate-a-field-with-a-custom-post-type-title" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Populate a field with a custom post type title"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-a-field-with-a-custom-post-type-title#post-78871</link>
			<pubDate>Thu, 04 Oct 2012 06:46:29 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">78871@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You're welcome.  Glad that worked for you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Exclusif on "Populate a field with a custom post type title"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-a-field-with-a-custom-post-type-title#post-78845</link>
			<pubDate>Thu, 04 Oct 2012 03:01:24 +0000</pubDate>
			<dc:creator>Exclusif</dc:creator>
			<guid isPermaLink="false">78845@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Fantastic, worked like a charm. Thanks for the great support!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Populate a field with a custom post type title"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-a-field-with-a-custom-post-type-title#post-78771</link>
			<pubDate>Wed, 03 Oct 2012 18:25:55 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">78771@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I think get_the_title needs a post ID to be able to return anything.  Can you change line 5 to this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$the_title_attribute = get_the_title($post-&#38;gt;ID);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If that does not work, please echo $the_title_attribute to see what it contains, before you try to return it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Exclusif on "Populate a field with a custom post type title"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-a-field-with-a-custom-post-type-title#post-78668</link>
			<pubDate>Wed, 03 Oct 2012 10:14:31 +0000</pubDate>
			<dc:creator>Exclusif</dc:creator>
			<guid isPermaLink="false">78668@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey,&#60;/p&#62;
&#60;p&#62;I'm trying to populate a form field with the title of the post to which the form is attached. The post is a custom post type (using sugar events). I can't seem to get it to work.&#60;br /&#62;
This is the code i'm using in functions.php:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_field_value_event_name&#38;#39;, &#38;#39;populate_post_the_title_attribute&#38;#39;);
		function populate_post_the_title_attribute($value){
	    global $post;

	    $the_title_attribute = get_the_title(&#38;#39;title&#38;#39;, $post-&#38;gt;the_title_attribute);

	    return $the_title_attribute;
	}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I also tried using just &#34;the_title&#34; instead of &#34;the_title_attribute&#34;, but no luck.&#60;/p&#62;
&#60;p&#62;Would really appreciate some help. Thanks for a great plugin!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
