<?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: Add a form to create a new custom post type</title>
		<link>https://legacy.forums.gravityhelp.com/topic/add-a-form-to-create-a-new-custom-post-type</link>
		<description>Gravity Support Forums Topic: Add a form to create a new custom post type</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 19:59: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/add-a-form-to-create-a-new-custom-post-type" rel="self" type="application/rss+xml" />

		<item>
			<title>Tim Bowen on "Add a form to create a new custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-a-form-to-create-a-new-custom-post-type#post-6525</link>
			<pubDate>Mon, 21 Jun 2010 19:57:19 +0000</pubDate>
			<dc:creator>Tim Bowen</dc:creator>
			<guid isPermaLink="false">6525@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Works well, especially if you use &#34;update_post_type&#34; instead of &#34;set_post_type&#34; and &#34;sp_events&#34; as the type (for The Events Calendar plugin)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Luke on "Add a form to create a new custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-a-form-to-create-a-new-custom-post-type#post-5241</link>
			<pubDate>Tue, 04 May 2010 19:09:24 +0000</pubDate>
			<dc:creator>Luke</dc:creator>
			<guid isPermaLink="false">5241@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@Jan&#60;/p&#62;
&#60;p&#62;Thanks for the idea. I updated &#34;set_post_type&#34; to &#34;update_post_type&#34; and had success. Idea came from &#60;a href=&#34;http://core.trac.wordpress.org/ticket/4844&#34; title=&#34;&#34; rel=&#34;nofollow&#34;&#62;WordPress Trac&#60;/a&#62;.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jan Egbert on "Add a form to create a new custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-a-form-to-create-a-new-custom-post-type#post-5183</link>
			<pubDate>Mon, 03 May 2010 11:16:28 +0000</pubDate>
			<dc:creator>Jan Egbert</dc:creator>
			<guid isPermaLink="false">5183@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@lukeass7&#60;br /&#62;
You need to change set_post_type to something else. I presume it is interfering with a new WordPress function called set_post_type().
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Add a form to create a new custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-a-form-to-create-a-new-custom-post-type#post-5163</link>
			<pubDate>Sat, 01 May 2010 23:11:28 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">5163@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;&#60;strong&#62;@alex&#60;/strong&#62;: Ah yes, the old &#34;&#60;em&#62;We can't add that highly useful feature because the end users would be too confused if we did&#60;/em&#62;&#34; mantra. You didn't work for Apple in a past life, did you? :-)&#60;/p&#62;
&#60;p&#62;Seriously though; there are several ways to achieve this. You can use sanitize_title_with_dashes() on the name of the form but require them to be unique, easy-peasy. &#60;/p&#62;
&#60;p&#62;And you could easily add a non-conspicuous field on the advanced tab such as &#60;em&#62;Name form for programmatic access&#60;/em&#62;&#34; the only reveals when checked (like &#34;&#60;em&#62;Allow field to be populated dynamically&#60;/em&#62;&#34; does for fields) that would default to the title passed to sanitize_title_with_dashes().&#60;/p&#62;
&#60;p&#62;I do hope you'll consider this. I had thought I'd gotten past having to use hard-coded numbers in code to identify things when I wrote my last FORTRAN program back in the early 80's, hope you won't prove me wrong.  ;-)&#60;/p&#62;
&#60;p&#62;(BTW, did you know your forum doesn't display &#60;em&#62;italics&#60;/em&#62;?)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Luke on "Add a form to create a new custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-a-form-to-create-a-new-custom-post-type#post-5120</link>
			<pubDate>Thu, 29 Apr 2010 20:36:47 +0000</pubDate>
			<dc:creator>Luke</dc:creator>
			<guid isPermaLink="false">5120@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm looking for this same functionality. When I insert the provided snippet into my functions.php page I get a white screen on refresh.&#60;/p&#62;
&#60;p&#62;I'm using Wordpress 3.0 Beta 1, current version of GF forms, form ID 1, and a Custom Post type of &#34;events&#34;.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mobiah on "Add a form to create a new custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-a-form-to-create-a-new-custom-post-type#post-4308</link>
			<pubDate>Sat, 27 Mar 2010 19:46:20 +0000</pubDate>
			<dc:creator>mobiah</dc:creator>
			<guid isPermaLink="false">4308@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Nevermind...pre submission I get the Form ID.  Post submission I get the Entry ID.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mobiah on "Add a form to create a new custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-a-form-to-create-a-new-custom-post-type#post-4307</link>
			<pubDate>Sat, 27 Mar 2010 19:35:25 +0000</pubDate>
			<dc:creator>mobiah</dc:creator>
			<guid isPermaLink="false">4307@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Alex-&#60;/p&#62;
&#60;p&#62;Regarding this snippet:&#60;/p&#62;
&#60;p&#62;add_filter(&#34;gform_post_data&#34;, &#34;set_post_type&#34;, 10, 2);&#60;br /&#62;
function set_post_type($post_data, $form){&#60;/p&#62;
&#60;p&#62;    if($form[&#34;id&#34;] == '5'){&#60;br /&#62;
        $post_data[&#34;post_type&#34;] = &#34;page&#34;;&#60;br /&#62;
    }&#60;br /&#62;
    return $post_data;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;I have tried to recreate this functionality on my end and it hasn't worked.  While trying to figure out what the problem is, I had the system echo $form[&#34;id&#34;] and this value appears to reflect not the ID of the form in the system but the ID of the entry.  On my end, this value reflects the number of times the form has been filled out.  Every time I fill the form out, this number increases by 1.&#60;/p&#62;
&#60;p&#62;I need to add an action dependent upon what form is being filled out.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>BaldwinKoo on "Add a form to create a new custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-a-form-to-create-a-new-custom-post-type#post-3901</link>
			<pubDate>Wed, 10 Mar 2010 18:17:02 +0000</pubDate>
			<dc:creator>BaldwinKoo</dc:creator>
			<guid isPermaLink="false">3901@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I guess my post is semi-related to this but I am looking for a way to have a custom post field that posts to the meta description and have the uploaded image post its link in post image field in thesis 1.6. Is this possible?&#60;/p&#62;
&#60;p&#62;I thought maybe that I might be able to change the excerpt field to post into the thesis meta description instead.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Add a form to create a new custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-a-form-to-create-a-new-custom-post-type#post-3542</link>
			<pubDate>Mon, 22 Feb 2010 12:57:19 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">3542@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;We will keep that in mind. I understand the advantages of using a name instead of the id, but that would require adding a &#34;Name&#34; field to the form editor that doesn't mean anything for non &#34;power-users&#34;. We are try very hard to keep the UI clean.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Add a form to create a new custom post type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-a-form-to-create-a-new-custom-post-type#post-3522</link>
			<pubDate>Sun, 21 Feb 2010 18:19:20 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">3522@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Awesome, you rock dudes! :)&#60;/p&#62;
&#60;p&#62;One question though, any chance you can enhance the API in the future to allow me to associate a programmatic name with the form rather than have to use the numeric ID?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
