<?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: Drop Down List / No duplicates</title>
		<link>https://legacy.forums.gravityhelp.com/topic/drop-down-list-no-duplicates</link>
		<description>Gravity Support Forums Topic: Drop Down List / No duplicates</description>
		<language>en-US</language>
		<pubDate>Sat, 18 Apr 2026 11:13:13 +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/drop-down-list-no-duplicates" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Drop Down List / No duplicates"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/drop-down-list-no-duplicates#post-168442</link>
			<pubDate>Tue, 12 Mar 2013 01:31:07 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">168442@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;One of our developers has a solution over at Gravity Wiz for this called &#34;GP Limit Choices&#34;.  You can read about it here: &#60;a href=&#34;http://gravitywiz.com/gravity-perks/&#34; rel=&#34;nofollow&#34;&#62;http://gravitywiz.com/gravity-perks/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I don't know of a way to do it with gform_pre_render.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ateam981 on "Drop Down List / No duplicates"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/drop-down-list-no-duplicates#post-163670</link>
			<pubDate>Thu, 07 Mar 2013 18:44:23 +0000</pubDate>
			<dc:creator>ateam981</dc:creator>
			<guid isPermaLink="false">163670@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;&#60;a href=&#34;http://rotaryribfest.muldowneyarts.net/purchase-a-booth-for-2013-event/&#34; rel=&#34;nofollow&#34;&#62;http://rotaryribfest.muldowneyarts.net/purchase-a-booth-for-2013-event/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;functions.php:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
// current url function
function current_url()
{
	$pageURL = &#38;#39;http&#38;#39;;
	if ($_SERVER[&#38;quot;HTTPS&#38;quot;] == &#38;quot;on&#38;quot;) {$pageURL .= &#38;quot;s&#38;quot;;}
	$pageURL .= &#38;quot;://&#38;quot;;
	if ($_SERVER[&#38;quot;SERVER_PORT&#38;quot;] != &#38;quot;80&#38;quot;) {
		$pageURL .= $_SERVER[&#38;quot;SERVER_NAME&#38;quot;].&#38;quot;:&#38;quot;.$_SERVER[&#38;quot;SERVER_PORT&#38;quot;].$_SERVER[&#38;quot;REQUEST_URI&#38;quot;];
	} else {
		$pageURL .= $_SERVER[&#38;quot;SERVER_NAME&#38;quot;].$_SERVER[&#38;quot;REQUEST_URI&#38;quot;];
	}
	return $pageURL;
}
//cull out booths already reserved
add_filter(&#38;quot;gform_pre_render&#38;quot;, &#38;quot;populate_dropdown&#38;quot;);
//add_filter(&#38;quot;gform_admin_pre_render&#38;quot;, &#38;quot;populate_dropdown&#38;quot;);
function populate_dropdown($form){
global $wpdb;
    if($form[&#38;quot;id&#38;quot;] != 2)
       return $form;
    $posts = $wpdb-&#38;gt;get_results(&#38;quot;SELECT boothname FROM $wpdb-&#38;gt;booth&#38;quot;);
    $items = array();
    $items[] = array(&#38;quot;text&#38;quot; =&#38;gt; &#38;quot;Select a slot&#38;quot;, &#38;quot;value&#38;quot; =&#38;gt; &#38;quot;&#38;quot;);
    foreach($posts as $post)
        $items[] = array(&#38;quot;text&#38;quot; =&#38;gt; $post-&#38;gt;boothname, &#38;quot;value&#38;quot; =&#38;gt; $post-&#38;gt;boothname);
    foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field)
        if($field[&#38;quot;id&#38;quot;] == 7){
            $field[&#38;quot;choices&#38;quot;] = $items;
        }
    return $form;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>ateam981 on "Drop Down List / No duplicates"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/drop-down-list-no-duplicates#post-162274</link>
			<pubDate>Wed, 06 Mar 2013 18:15:36 +0000</pubDate>
			<dc:creator>ateam981</dc:creator>
			<guid isPermaLink="false">162274@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;How do I configure the drop down field type to not show selections for items that have already been chosen from the list (no duplicates stops the add of record, but it would be nice to not show the ones on file.&#60;br /&#62;
I have reviewed and searched for 2 days on how i might do this in php with prerender, but all of the examples use simple calls to getposts.&#60;br /&#62;
My guess is that the combination of not fully understanding the db structure form my gforms tables and how to organize the php to do what i need is the culprit.&#60;br /&#62;
Any help would be great.&#60;br /&#62;
Thanks in advance.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
