<?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: Hook or Filter to populate description with post content?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/hook-or-filter-to-populate-description-with-post-content</link>
		<description>Gravity Support Forums Topic: Hook or Filter to populate description with post content?</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 20:39:47 +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/hook-or-filter-to-populate-description-with-post-content" rel="self" type="application/rss+xml" />

		<item>
			<title>Dana Cobb on "Hook or Filter to populate description with post content?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hook-or-filter-to-populate-description-with-post-content#post-53582</link>
			<pubDate>Tue, 27 Mar 2012 11:28:49 +0000</pubDate>
			<dc:creator>Dana Cobb</dc:creator>
			<guid isPermaLink="false">53582@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, WebEndev,&#60;/p&#62;
&#60;p&#62;Below is an example of pulling the content for an existing post and using that content as the description for a form field. I use the WordPress function get_post to pull out the content - &#60;a href=&#34;http://codex.wordpress.org/Function_Reference/get_post&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Function_Reference/get_post&#60;/a&#62; . I also use the Gravity Forms hook &#34;gform_pre_render&#34; - &#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; . Change the code to reference your post id and field id. You may also set which form you want to apply this code to by using gform_pre_render_1 (add the form id to the hook).&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_render&#38;quot;, &#38;quot;populate_description&#38;quot;);
function populate_description($form)
{
	$id = 142; //post id
	$post = get_post($id); //WordPress get_post function
	$content = $post-&#38;gt;post_content;
	//loop through fields on form
	//to get the field for which you want to alter the description
	foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field)
        //change the description for field 2
        if($field[&#38;quot;id&#38;quot;] == 2){
            $field[&#38;quot;description&#38;quot;] = $content;
        }
	//return altered form
	return $form;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>WebEndev on "Hook or Filter to populate description with post content?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hook-or-filter-to-populate-description-with-post-content#post-53455</link>
			<pubDate>Mon, 26 Mar 2012 12:44:09 +0000</pubDate>
			<dc:creator>WebEndev</dc:creator>
			<guid isPermaLink="false">53455@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes, exactly. But keep the post formatting...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Dana Cobb on "Hook or Filter to populate description with post content?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hook-or-filter-to-populate-description-with-post-content#post-53452</link>
			<pubDate>Mon, 26 Mar 2012 12:39:42 +0000</pubDate>
			<dc:creator>Dana Cobb</dc:creator>
			<guid isPermaLink="false">53452@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, WebEndev,&#60;/p&#62;
&#60;p&#62;I am not sure I understand what you mean, could you explain a bit more? Are you loading a form and populating it with information from an existing post and want what was submitted in a Post Body field to be displayed as the description for your checkbox field on this new form?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>WebEndev on "Hook or Filter to populate description with post content?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hook-or-filter-to-populate-description-with-post-content#post-52883</link>
			<pubDate>Mon, 19 Mar 2012 15:20:42 +0000</pubDate>
			<dc:creator>WebEndev</dc:creator>
			<guid isPermaLink="false">52883@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is there a way to retrieve a posts content and populate it in the field description (specifically a checkbox field description?&#60;/p&#62;
&#60;p&#62;I would like to populate the description with the formatted content from a post.&#60;/p&#62;
&#60;p&#62;I didn't see anything in the documentation, but I may be missing it.&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
