<?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: Creating a directory w/Gravity Form and categories</title>
		<link>https://legacy.forums.gravityhelp.com/topic/creating-a-directory-wgravity-form-and-categories</link>
		<description>Gravity Support Forums Topic: Creating a directory w/Gravity Form and categories</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 22:09:14 +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/creating-a-directory-wgravity-form-and-categories" rel="self" type="application/rss+xml" />

		<item>
			<title>Alex Cancado on "Creating a directory w/Gravity Form and categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-directory-wgravity-form-and-categories#post-28488</link>
			<pubDate>Fri, 24 Jun 2011 12:10:52 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">28488@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Try the following. I am assuming your are using the default name field with First and Last names.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//NOTE: replace 175 with your Form ID
$entries = RGFormsModel::get_leads(175);
echo &#38;quot;&#38;lt;table&#38;gt;
        &#38;lt;tr&#38;gt;
            &#38;lt;td&#38;gt;Name&#38;lt;/td&#38;gt;
            &#38;lt;td&#38;gt;Post&#38;lt;/td&#38;gt;
        &#38;lt;/tr&#38;gt;&#38;quot;;

foreach($entries as $entry){
    $post = get_post($entry[&#38;quot;post_id&#38;quot;]);
    if(!$post &#124;&#124; $post-&#38;gt;post_status == &#38;quot;trash&#38;quot;)
        continue;

    $permalink = get_permalink($entry[&#38;quot;post_id&#38;quot;]);
    //NOTE: replace 1 and 2 with your Field IDs
    echo &#38;quot;&#38;lt;tr&#38;gt;
            &#38;lt;td&#38;gt;{$entry[&#38;quot;1.3&#38;quot;]} {$entry[&#38;quot;1.6&#38;quot;]}&#38;lt;/td&#38;gt;
            &#38;lt;td&#38;gt;&#38;lt;a href=&#38;#39;{$permalink}&#38;#39;&#38;gt;{$entry[&#38;quot;2&#38;quot;]}&#38;lt;/a&#38;gt;&#38;lt;/td&#38;gt;
          &#38;lt;/tr&#38;gt;&#38;quot;;
}
echo &#38;quot;&#38;lt;/table&#38;gt;&#38;quot;;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Creating a directory w/Gravity Form and categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-directory-wgravity-form-and-categories#post-28486</link>
			<pubDate>Fri, 24 Jun 2011 11:53:36 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">28486@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;THANKS! It totally worked. I have a few other things I would like to try now.&#60;/p&#62;
&#60;p&#62;Only post active posts (do not show anything that has been deleted)&#60;br /&#62;
Make 1 of the fields (post title) a link to the post&#60;br /&#62;
How to combine First &#38;amp; Last name from form to show as 1 field.&#60;/p&#62;
&#60;p&#62;Any suggestions?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Creating a directory w/Gravity Form and categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-directory-wgravity-form-and-categories#post-28484</link>
			<pubDate>Fri, 24 Jun 2011 11:40:40 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">28484@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Jen,&#60;br /&#62;
Try the following. You will need add it to the template file you would like to display this information. Make sure to replace the Form ID and Field IDs to match yours.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
//NOTE: replace 167 with your Form ID
$entries = RGFormsModel::get_leads(167);
echo &#38;quot;&#38;lt;table&#38;gt;
        &#38;lt;tr&#38;gt;
            &#38;lt;td&#38;gt;Field 1&#38;lt;/td&#38;gt;
            &#38;lt;td&#38;gt;Field 2&#38;lt;/td&#38;gt;
        &#38;lt;/tr&#38;gt;&#38;quot;;

foreach($entries as $entry){
    //NOTE: replace 1 and 2 with your Field IDs
    echo &#38;quot;&#38;lt;tr&#38;gt;
            &#38;lt;td&#38;gt;{$entry[&#38;quot;1&#38;quot;]}&#38;lt;/td&#38;gt;
            &#38;lt;td&#38;gt;{$entry[&#38;quot;2&#38;quot;]}&#38;lt;/td&#38;gt;
          &#38;lt;/tr&#38;gt;&#38;quot;;
}
echo &#38;quot;&#38;lt;/table&#38;gt;&#38;quot;;
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Creating a directory w/Gravity Form and categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-directory-wgravity-form-and-categories#post-28422</link>
			<pubDate>Thu, 23 Jun 2011 15:05:40 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">28422@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, I am pretty new to this, so I apologize in advance if I am making no sense.&#60;/p&#62;
&#60;p&#62;What i am trying to do is display 3 fields from our form on a page. I know the fom ID and the Field number(s). I just have no clue how to pull the data for those fields and display them.&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Jen :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>brianfidler on "Creating a directory w/Gravity Form and categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-directory-wgravity-form-and-categories#post-23984</link>
			<pubDate>Fri, 22 Apr 2011 17:21:17 +0000</pubDate>
			<dc:creator>brianfidler</dc:creator>
			<guid isPermaLink="false">23984@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That's much better! Thanks David.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Creating a directory w/Gravity Form and categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-directory-wgravity-form-and-categories#post-23881</link>
			<pubDate>Thu, 21 Apr 2011 15:20:12 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">23881@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Try using this function to output the form meta:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastie.org/1820138&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/1820138&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You'll find that it is significantly more readable and gives you a better idea of hierarchy in the array.&#60;/p&#62;
&#60;p&#62;Use like so:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$form = RGFormsModel::get_form_meta($form);
print_rr($form);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>brianfidler on "Creating a directory w/Gravity Form and categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-directory-wgravity-form-and-categories#post-23874</link>
			<pubDate>Thu, 21 Apr 2011 14:51:46 +0000</pubDate>
			<dc:creator>brianfidler</dc:creator>
			<guid isPermaLink="false">23874@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks David, &#60;/p&#62;
&#60;p&#62;When using the RGFormsModel::get_form_meta($form) is there a simple way to locate (or maybe display) the specific portion of the array I am interested in?&#60;/p&#62;
&#60;p&#62;For instance, I pasted the results of RGFormsModel::get_form_meta($form) into a text editor and slowly waded my way through it until I was able to identify the array data I was interested in ($form[fields][16][inputs][1][label]). But I'm guessing there is a simpler way? right?&#60;/p&#62;
&#60;p&#62;thanks&#60;br /&#62;
brian
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Creating a directory w/Gravity Form and categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-directory-wgravity-form-and-categories#post-23408</link>
			<pubDate>Fri, 15 Apr 2011 15:01:30 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">23408@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Brian,&#60;/p&#62;
&#60;p&#62;To answer your first question, when querying field numbers which are floats it is probably easiest to cast the field number as a decimal. MySQL will return inconsistent results when searching for a float data type (&#60;a href=&#34;http://dev.mysql.com/doc/refman/4.1/en/problems-with-float.html&#34; rel=&#34;nofollow&#34;&#62;more info on this here&#60;/a&#62;). Alternately, you can search by a range as you've posted above. Quick example of a query casting the field number as a decimal:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$removed = $wpdb-&#38;gt;query(&#38;quot;DELETE FROM $table WHERE lead_id = $entry_id AND form_id = $form_id AND CAST(field_number as DECIMAL(4,2)) = $field_id&#38;quot;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;For an easier way to retrieve the form meta, you can use this function:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$form = RGFormsModel::get_form_meta($form_id);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Let me know if this does the trick for you if your requirements are more specific.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>brianfidler on "Creating a directory w/Gravity Form and categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-directory-wgravity-form-and-categories#post-23123</link>
			<pubDate>Wed, 13 Apr 2011 02:17:08 +0000</pubDate>
			<dc:creator>brianfidler</dc:creator>
			<guid isPermaLink="false">23123@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;In order to build my parent categories list I need to access wp_rg_form_meta.display_meta field. I tried unserializing the data in this field however it gives me this error:&#60;/p&#62;
&#60;p&#62;Warning: unserialize() expects parameter 1 to be string&#60;/p&#62;
&#60;p&#62;How can I get the parent categories (in my case it is putting all of my parent category choices into wp_rg_lead_detail.field_number=5) out of that field if I'm unable to unserialize it?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>brianfidler on "Creating a directory w/Gravity Form and categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/creating-a-directory-wgravity-form-and-categories#post-23122</link>
			<pubDate>Wed, 13 Apr 2011 00:28:28 +0000</pubDate>
			<dc:creator>brianfidler</dc:creator>
			<guid isPermaLink="false">23122@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I've got two questions regarding the sql that David added to pastie.org. If I want to query an address (which in my form has a field_number=92.1 and a form_id=4, even though there area a number of records that have this field_number, the sql doesn't seem to work with any non-integer numbers. &#60;/p&#62;
&#60;p&#62;It will work if I use range, for instance &#38;gt;  or &#38;lt; does work. So for example the sql below works and will return any records with a field_number between 92 and 93 (i.e. 92.5, 92.7, 92.8):&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;SELECT * FROM wp_rg_lead_detail
WHERE wp_rg_lead_detail.field_number&#38;gt;92 AND wp_rg_lead_detail.field_number &#38;lt; 93 AND wp_rg_lead_detail .form_id=4&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Why doesn't the query work if I try to get records where wp_rg_lead_detail.field_number=92.5?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
