<?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: set default value for the post category field in a custom post type</title>
		<link>https://legacy.forums.gravityhelp.com/topic/set-default-value-for-the-post-category-field-in-a-custom-post-type</link>
		<description>Gravity Support Forums Topic: set default value for the post category field in a custom post type</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 08:30:42 +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/set-default-value-for-the-post-category-field-in-a-custom-post-type" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "set default value for the post category field in a custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/set-default-value-for-the-post-category-field-in-a-custom-post-type#post-29470</link>
			<pubDate>Fri, 08 Jul 2011 12:32:49 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">29470@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I couldn't tell what you were asking based on your original post, it looked more like a code example and a statement rather than a question.  Can you clarify what exactly the issue is that you are having?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "set default value for the post category field in a custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/set-default-value-for-the-post-category-field-in-a-custom-post-type#post-29434</link>
			<pubDate>Thu, 07 Jul 2011 21:42:09 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">29434@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;What happens and what did you expect to happen?  I use CPT with Gravity Forms and I am unclear what sort of trouble you're having.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>riskiii on "set default value for the post category field in a custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/set-default-value-for-the-post-category-field-in-a-custom-post-type#post-29426</link>
			<pubDate>Thu, 07 Jul 2011 19:37:19 +0000</pubDate>
			<dc:creator>riskiii</dc:creator>
			<guid isPermaLink="false">29426@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Bump, I am hoping someone can point me in the right direction....
&#60;/p&#62;</description>
		</item>
		<item>
			<title>riskiii on "set default value for the post category field in a custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/set-default-value-for-the-post-category-field-in-a-custom-post-type#post-29192</link>
			<pubDate>Wed, 06 Jul 2011 00:53:23 +0000</pubDate>
			<dc:creator>riskiii</dc:creator>
			<guid isPermaLink="false">29192@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have followed the forum topic, and used the following code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function dgs_set_post_type($post_data, $form) {

   if ( $form[ &#38;#39;id&#38;#39; ] == &#38;#39;1&#38;#39; ) {
      $post_data[ &#38;#39;post_type&#38;#39; ] = &#38;#39;cpt_hr_posts&#38;#39;;
      $post_data[ &#38;#39;tax_hr_posts_category&#38;#39; ] = &#38;#39;our-space&#38;#39;;
      $group = &#38;#39;our-space&#38;#39;;
   }

   return $post_data;
}
add_filter(&#38;#39;gform_post_data&#38;#39;, &#38;#39;dgs_set_post_type&#38;#39;, 10, 2);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I used the advanced tab on the group, and gave the parameter field the value of &#34;group&#34;.  The default value from the custom taxonomy will be &#34;our-space&#34;.  In case you need it the taxonomy name is &#34;tax_hr_posts_category&#34;.  In additon to putting the value in the hooks, I tried the get values of &#60;a href=&#34;http://intranet.omrf.hsc.net.ou.edu/our-space/?group=our-space&#34; rel=&#34;nofollow&#34;&#62;http://intranet.omrf.hsc.net.ou.edu/our-space/?group=our-space&#60;/a&#62; where &#34;our-space&#34; is a page with the shortcode added.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
