<?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: List forms in dropdown within options pages</title>
		<link>https://legacy.forums.gravityhelp.com/topic/list-forms-in-dropdown-within-options-pages</link>
		<description>Gravity Support Forums Topic: List forms in dropdown within options pages</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 14:02:04 +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/list-forms-in-dropdown-within-options-pages" rel="self" type="application/rss+xml" />

		<item>
			<title>wilrevehl on "List forms in dropdown within options pages"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/list-forms-in-dropdown-within-options-pages#post-18142</link>
			<pubDate>Wed, 09 Feb 2011 22:58:15 +0000</pubDate>
			<dc:creator>wilrevehl</dc:creator>
			<guid isPermaLink="false">18142@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Perfect! Thank you.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
If you let me know specifically what you want to do with the GFUserData class I can better advise its use. :)
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Whoops.  Yep, I was off there.  Didn't need GFUserData.  It was this that I was after: $forms = RGFormsModel::get_forms();  Nailed it!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "List forms in dropdown within options pages"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/list-forms-in-dropdown-within-options-pages#post-18126</link>
			<pubDate>Wed, 09 Feb 2011 20:22:47 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">18126@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Wil,&#60;/p&#62;
&#60;p&#62;Here is a quick and dirty function that will generate a list of the Gravity Forms.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastie.org/1547182&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/1547182&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;If you let me know specifically what you want to do with the GFUserData class I can better advise its use. :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Wilson Revehl on "List forms in dropdown within options pages"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/list-forms-in-dropdown-within-options-pages#post-18113</link>
			<pubDate>Wed, 09 Feb 2011 18:54:03 +0000</pubDate>
			<dc:creator>Wilson Revehl</dc:creator>
			<guid isPermaLink="false">18113@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Guys!&#60;/p&#62;
&#60;p&#62;I'm trying to minimize the occurrence of &#34;magic numbers&#34; within my themes/plugins.  I have several situations where I need to specify a form ID, and I'd like to create select boxes so that the appropriate forms can be specified from within an options page, rather than hard-coding them in a template.  I'm looking for something similar to wp_dropdown_pages() or  wp_dropdown_categories(), but for GF.&#60;/p&#62;
&#60;p&#62;I noticed that this is implemented within the settings for user registration forms.  I used that code as a starting point, but I'm not exactly sure how to properly use GFUserData() from within my plugin/theme options page. Can you prod me in the right direction?&#60;/p&#62;
&#60;p&#62;Here is what I'm working with:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php $options = get_option( &#38;#39;my_theme_settings&#38;#39; ); ?&#38;gt;
&#38;lt;label for=&#38;quot;gfcustom_reg_form&#38;quot;&#38;gt;Select the User Registration Form&#38;lt;/label&#38;gt;
&#38;lt;select id=&#38;quot;gfcustom_reg_form&#38;quot; name=&#38;quot;gfcustom_reg_form&#38;quot;&#38;gt;
  &#38;lt;option value=&#38;quot;&#38;quot;&#38;gt;Select a form&#38;lt;/option&#38;gt;
  &#38;lt;?php
    $available_forms = GFUserData::get_available_forms(); 

    foreach($available_forms as $current_form) {
      $selected = (absint($current_form-&#38;gt;id) == $options[&#38;quot;reg_form_id&#38;quot;]) ? &#38;#39;selected=&#38;quot;selected&#38;quot;&#38;#39; : &#38;#39;&#38;#39;;
	?&#38;gt;
  &#38;lt;option value=&#38;quot;&#38;lt;?php echo absint($current_form-&#38;gt;id) ?&#38;gt;&#38;quot; &#38;lt;?php echo $selected; ?&#38;gt;&#38;gt;&#38;lt;?php echo esc_html($current_form-&#38;gt;title) ?&#38;gt;&#38;lt;/option&#38;gt;
  &#38;lt;?php
  }
  ?&#38;gt;
&#38;lt;/select&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
