<?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: Getting a single entry as an object</title>
		<link>https://legacy.forums.gravityhelp.com/topic/getting-a-single-entry-as-an-object</link>
		<description>Gravity Support Forums Topic: Getting a single entry as an object</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 01:04:35 +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/getting-a-single-entry-as-an-object" rel="self" type="application/rss+xml" />

		<item>
			<title>michaelbyrd123 on "Getting a single entry as an object"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-a-single-entry-as-an-object#post-14346</link>
			<pubDate>Mon, 13 Dec 2010 18:53:20 +0000</pubDate>
			<dc:creator>michaelbyrd123</dc:creator>
			<guid isPermaLink="false">14346@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Woohoo worked like a charm.  Thanks for the quick response.  So glad I bought dev license so far ;]
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Getting a single entry as an object"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-a-single-entry-as-an-object#post-14344</link>
			<pubDate>Mon, 13 Dec 2010 18:46:57 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">14344@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes, the field label is stored as a serialized string, so you won't be able to get them all at once. You will need to get them one by one, using the following PHP code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//Replace 10 with your form ID
$form_meta = RGFormsModel::get_form_meta(10);

 $field1 = RGFormsModel::get_field($form_meta, 1);
 $label = $field1[&#38;quot;label&#38;quot;];

$field2 = RGFormsModel::get_field($form_meta, 2);
 $label2 = $field2[&#38;quot;label&#38;quot;];&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>michaelbyrd123 on "Getting a single entry as an object"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-a-single-entry-as-an-object#post-14334</link>
			<pubDate>Mon, 13 Dec 2010 18:21:26 +0000</pubDate>
			<dc:creator>michaelbyrd123</dc:creator>
			<guid isPermaLink="false">14334@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Okay, so this has been working good but now I need to take it a step further and am getting a bit stumped.  I now want to convert all of the field_numbers into their appropriate title.  For example in a simple form they might be 1, 2.1,  2.2,  2.3,  2.4,  3. &#60;/p&#62;
&#60;p&#62;How would I go about converting these to their respective titles?  The info I need seems to be stored in an enormous string in wp_rg_form_meta.  Is there a built in function I can use to get the headings given the string?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Getting a single entry as an object"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-a-single-entry-as-an-object#post-14180</link>
			<pubDate>Fri, 10 Dec 2010 12:15:28 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">14180@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You got it! This is the way to do it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>michaelbyrd123 on "Getting a single entry as an object"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-a-single-entry-as-an-object#post-14135</link>
			<pubDate>Thu, 09 Dec 2010 13:57:00 +0000</pubDate>
			<dc:creator>michaelbyrd123</dc:creator>
			<guid isPermaLink="false">14135@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;So I'm trying to figure out a mysql statement that will get a complete gravity form entry, given the lead id, as an object.  Can anyone help? The reason I want to pull directly from the gravity form database is that I want the administrator changes through the entries tabs to be reflected, instead of creating my own database table when forms are submitted.  So far i've got-&#60;/p&#62;
&#60;p&#62;		SELECT wp_rg_lead_detail.value, wp_rg_lead_detail_long.value AS long_value&#60;br /&#62;
		FROM &#60;code&#62;wp_rg_lead_detail&#60;/code&#62;&#60;br /&#62;
		LEFT JOIN &#60;code&#62;wp_rg_lead_detail_long&#60;/code&#62; ON id=lead_detail_id&#60;br /&#62;
		WHERE lead_id=$id ORDER BY field_number;&#60;/p&#62;
&#60;p&#62;This works okay, and gets the complete lead, with it's field number sorted.  I guess I sort of answered my own question ^^.  I can then get the field value by using an if statement, getting the detail value if the long value is empty (actually youd probably want to include the field_number in your sql statement as well)&#60;/p&#62;
&#60;p&#62;Let me know if anyone has a better approach than this.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
