<?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 labels from gravity form</title>
		<link>https://legacy.forums.gravityhelp.com/topic/getting-labels-from-gravity-form</link>
		<description>Gravity Support Forums Topic: getting labels from gravity form</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 06:33:56 +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-labels-from-gravity-form" rel="self" type="application/rss+xml" />

		<item>
			<title>Alex Cancado on "getting labels from gravity form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-labels-from-gravity-form#post-10928</link>
			<pubDate>Fri, 08 Oct 2010 09:56:34 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">10928@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I think the best way to do this is to use Gravity Forms' entry detail functions. It will render a table similar to the one displayed on the entry detail page. You can then style the table however you like.  Following is the code snippet you will need.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if(!class_exists(&#38;quot;GFEntryDetail&#38;quot;))
    require_once(&#38;quot;entry_detail.php&#38;quot;);

if(!class_exists(&#38;quot;RGFormsModel&#38;quot;))
    require_once(&#38;quot;forms_model.php&#38;quot;);

if(!class_exists(&#38;quot;GFCommon&#38;quot;))
    require_once(&#38;quot;common.php&#38;quot;);

$form = RGFormsModel::get_form_meta(53);
$entry = RGFormsModel::get_lead(386);
GFEntryDetail::lead_detail_grid($form, $entry);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If this does not work for you and you need more control over the markup, I would copy and paste the lead_detail_grid() function to your functions.php file and make the modifications to the markup that you need to make.&#60;br /&#62;
Good luck!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Krystian on "getting labels from gravity form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-labels-from-gravity-form#post-10865</link>
			<pubDate>Wed, 06 Oct 2010 15:29:43 +0000</pubDate>
			<dc:creator>Krystian</dc:creator>
			<guid isPermaLink="false">10865@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, thanks for reply. From the beginning. I wrote a plugin which adds user after filling the form. Login is email. Then after login such a user I would like to print his entries.&#60;br /&#62;
here is my code so far. This code prints all values but not all labels and I don't know why?&#60;br /&#62;
So again I would like to return label/name of the field from form and value which was entered by the user. Now for example this code returns 90% of what I need -&#38;gt; all values but not all names :( I hope it's clear for you&#60;br /&#62;
link &#60;a href=&#34;http://mundus.amu.edu.pl/tosca/application/test-shortcut-op&#34; rel=&#34;nofollow&#34;&#62;http://mundus.amu.edu.pl/tosca/application/test-shortcut-op&#60;/a&#62;&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_shortcode(&#38;#39;display-info&#38;#39;, &#38;#39;pre_submission_handler&#38;#39;);
function pre_submission_handler(){

	require_once(ABSPATH . WPINC . &#38;quot;/wp-db.php&#38;quot;);
 	global $wpdb;
	global $current_user;

	get_currentuserinfo();

      	echo &#38;#39;Username: &#38;#39; . $current_user-&#38;gt;user_login . &#38;quot;&#38;lt;br /&#38;gt;&#38;quot;;

 	$sql = &#38;quot;SELECT * FROM &#38;lt;code&#38;gt;wp_rg_lead_detail&#38;lt;/code&#38;gt; WHERE lead_id = 47&#38;quot;; // lead_id will be automaticly from logged user

    	$result = $wpdb-&#38;gt;get_results($sql);

	$columns = RGFormsModel::get_grid_columns(2, false);

	echo &#38;#39;&#38;lt;table border=&#38;quot;1&#38;quot;&#38;gt;&#38;#39;;

	foreach($result as $row)
	{
		echo &#38;#39;&#38;lt;tr&#38;gt;&#38;#39;;

		echo &#38;#39;&#38;lt;td&#38;gt;&#38;#39;;

		echo $columns[$row-&#38;gt;field_number][label] . &#38;quot;&#38;lt;br /&#38;gt;&#38;quot;;

		echo &#38;#39;&#38;lt;/td&#38;gt;&#38;#39;;

		echo &#38;#39;&#38;lt;td&#38;gt;&#38;#39;;

		echo $row-&#38;gt;value . &#38;quot;&#38;lt;br /&#38;gt;&#38;quot;;

		echo &#38;#39;&#38;lt;/td&#38;gt;&#38;#39;;

		echo &#38;#39;&#38;lt;/tr&#38;gt;&#38;#39;;

	}

	echo &#38;#39;&#38;lt;/table&#38;gt;&#38;#39;;

	echo var_export(RGFormsModel::get_lead(47),true);
	echo var_export($columns,true);

}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "getting labels from gravity form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-labels-from-gravity-form#post-10856</link>
			<pubDate>Wed, 06 Oct 2010 12:20:42 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">10856@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The get_grid_columns() function will return the fields that you have configured in your entry list page. If you don't have the email being displayed in the list, that is the reason it is not getting displayed by your code.&#60;br /&#62;
If that is not the case, I will be happy to help you with a code snippet, but I need some more details on what you are trying to accomplish. Is this just for this form or you will want to apply it to any other form? From the code above it looks like you want to display only one entry. Is that the case, or do you want to display a list of all entries for a form?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Krystian on "getting labels from gravity form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-labels-from-gravity-form#post-10839</link>
			<pubDate>Wed, 06 Oct 2010 05:33:37 +0000</pubDate>
			<dc:creator>Krystian</dc:creator>
			<guid isPermaLink="false">10839@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, I'm writing a code which returns on the screen entries from my GForm. It's easy. But a have got one problem. I cannot get all labels of my field e.g form has three fields: name, surname, email. I don't see the last one&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$columns = RGFormsModel::get_grid_columns(2, false);&#60;/code&#62;&#60;/pre&#62;
&#60;pre&#62;&#60;code&#62;echo var_export(RGFormsModel::get_lead(47),true); // 47 is some id&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;code&#62;echo var_export($columns,true);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;How to get all labels in order to achieve something like this:&#60;br /&#62;
fieldLabel  &#124;   entry&#60;br /&#62;
fieldLabel  &#124;   entry&#60;br /&#62;
fieldLabel  &#124;   entry&#60;/p&#62;
&#60;p&#62;if this is not a proper place in the forum to such a question please move it somewhere else
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
