<?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 Drop with Categories from Current Post</title>
		<link>https://legacy.forums.gravityhelp.com/topic/populate-a-drop-with-categories-from-current-post</link>
		<description>Gravity Support Forums Topic: Populate a Drop with Categories from Current Post</description>
		<language>en-US</language>
		<pubDate>Wed, 08 Apr 2026 16:32:54 +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-drop-with-categories-from-current-post" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Populate a Drop with Categories from Current Post"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-a-drop-with-categories-from-current-post#post-34236</link>
			<pubDate>Fri, 02 Sep 2011 11:44:15 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">34236@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Here's an explanation of how to dynamically populate a drop down:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You will need to use the &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_pre_render&#34; rel=&#34;nofollow&#34;&#62;gform_pre_render&#60;/a&#62; hook and the WordPress function &#60;a href=&#34;http://codex.wordpress.org/Function_Reference/get_the_category&#34; rel=&#34;nofollow&#34;&#62;get_the_category&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;I created an example here:&#60;br /&#62;
&#60;a href=&#34;http://gravity.chrishajer.com/2011/09/02/inquire-about-rims/&#34; rel=&#34;nofollow&#34;&#62;http://gravity.chrishajer.com/2011/09/02/inquire-about-rims/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Here's the code I used:&#60;br /&#62;
&#60;a href=&#34;http://pastebin.com/ynTTJqu7&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/ynTTJqu7&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Change the 33 on line 3 of this code to your form ID.  Also, see line 10 for the CSS Class Name to use to &#34;tag&#34; your select box to be targeted by this function (I used populate-categories, which you enter on the advanced tab of your drop down, in the form builder.  You can also change the &#34;instructive option&#34; on line 15. I used &#34;Rim Size&#34; but you can change that and see how it affects the  display and validation of the drop down.&#60;/p&#62;
&#60;p&#62;If you have more questions, please let us know.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>thinkluke on "Populate a Drop with Categories from Current Post"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-a-drop-with-categories-from-current-post#post-34187</link>
			<pubDate>Thu, 01 Sep 2011 20:57:59 +0000</pubDate>
			<dc:creator>thinkluke</dc:creator>
			<guid isPermaLink="false">34187@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Anyone?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>thinkluke on "Populate a Drop with Categories from Current Post"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-a-drop-with-categories-from-current-post#post-34121</link>
			<pubDate>Thu, 01 Sep 2011 06:33:37 +0000</pubDate>
			<dc:creator>thinkluke</dc:creator>
			<guid isPermaLink="false">34121@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, &#60;/p&#62;
&#60;p&#62;What I want to do is populate a dropdown field with categories from the current post.&#60;/p&#62;
&#60;p&#62;Basically it is for a website for custom rims, each rim will be a custom post type / product categories by style, brand and rim size. Some rims only have 20&#34; or 22&#34;, so the size will be a sub cat of the parent rim size. I want to display only the rim size in a drop down, so a user fills out a online quote form on the same page as the rim and selects they= size they want 20&#34; or 22&#34;. Make sense? Same as this: &#60;a href=&#34;http://www.ozzytyres.com.au/wheels/initial-d-black-red-stripe/&#34; rel=&#34;nofollow&#34;&#62;http://www.ozzytyres.com.au/wheels/initial-d-black-red-stripe/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
