<?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 values of form fields</title>
		<link>https://legacy.forums.gravityhelp.com/topic/getting-values-of-form-fields</link>
		<description>Gravity Support Forums Topic: Getting values of form fields</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 09:43:19 +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-values-of-form-fields" rel="self" type="application/rss+xml" />

		<item>
			<title>David Smith on "Getting values of form fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-values-of-form-fields#post-46521</link>
			<pubDate>Mon, 16 Jan 2012 19:16:52 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">46521@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Sascha,&#60;/p&#62;
&#60;p&#62;You can only pass the variables that are available to that that hook. They will all be documented in the documentation for that hook. In this case, the only variables available are the $entry object and the $form object.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sascha on "Getting values of form fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-values-of-form-fields#post-46519</link>
			<pubDate>Mon, 16 Jan 2012 19:13:00 +0000</pubDate>
			<dc:creator>sascha</dc:creator>
			<guid isPermaLink="false">46519@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey David,&#60;/p&#62;
&#60;p&#62;that sorted it! Thanks!&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;gform_after_submission_11&#38;#39;, &#38;#39;update_individual_fields_11&#38;#39;, 10, 2);

function update_individual_fields_11($entry, $form) {
	var_dump($entry);
	echo &#38;#39;&#38;lt;/br&#38;gt;&#38;#39;;
	echo &#38;#39;&#38;lt;/br&#38;gt;&#38;#39;;
    $form = RGFormsModel::get_form_meta(&#38;#39;11&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;BTW: can I pass any values/variables to the function in the brackets? And do I still need the RGFormsModel stuff or is $form just accessible, when I put it in the brackets of the function?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Getting values of form fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-values-of-form-fields#post-46515</link>
			<pubDate>Mon, 16 Jan 2012 19:02:23 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">46515@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Sascha,&#60;/p&#62;
&#60;p&#62;First off, this documentation will demonstrate how you can pass the $form object as well as the $entry object to your function:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Secondly, try dumping $entry at the very top of your function and see what happens. You also do not need to add the &#34;global $entry&#34; bit. Let me know. :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sascha on "Getting values of form fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-values-of-form-fields#post-46510</link>
			<pubDate>Mon, 16 Jan 2012 18:47:02 +0000</pubDate>
			<dc:creator>sascha</dc:creator>
			<guid isPermaLink="false">46510@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi there,&#60;/p&#62;
&#60;p&#62;somehow I am struggling to get the value of the form fields with this code below. I just try to dump $entry, but nothing shows. It just returns NULL.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;gform_after_submission_11&#38;#39;, &#38;#39;update_individual_fields_11&#38;#39;);

function update_individual_fields_11($entry) {
    $form = RGFormsModel::get_form_meta(&#38;#39;11&#38;#39;);
	global $entry;
	$post_field = $form[fields][0][&#38;quot;postCustomFieldName&#38;quot;];
	echo &#38;#39;form[fields]&#38;#39;;
	var_dump ($form[fields]);
	//global $form;
	echo &#38;#39;&#38;lt;/br&#38;gt;&#38;#39;;
	echo &#38;#39;&#38;lt;/br&#38;gt;&#38;#39;;
	$id = 218; //need to get the current post value there!
	echo &#38;#39;$form&#38;#39;;
	var_dump($form); // form object
	echo &#38;#39;&#38;lt;/br&#38;gt;&#38;#39;;
	echo &#38;#39;&#38;lt;/br&#38;gt;&#38;#39;;
	echo &#38;#39;$entry: &#38;#39;;
	// ----------------------------------------------------------------
	var_dump($entry); // entry object -------is not availabe?????????
	// how do I pull the submitted data from form?
	// ---------------------------------------------------------
	echo &#38;#39;&#38;lt;/br&#38;gt;&#38;#39;;
	echo &#38;#39;&#38;lt;/br&#38;gt;&#38;#39;;
	echo &#38;#39;Post custom field name: &#38;#39; . $post_field . &#38;#39;&#38;lt;/br&#38;gt;&#38;#39;;
		// Create entry in post meta
		update_post_meta($id, $post_field, &#38;#39;value from form here&#38;#39;, true);
		echo &#38;#39;&#38;lt;/br&#38;gt;&#38;#39;;
		echo &#38;#39;&#38;lt;/br&#38;gt;&#38;#39;;
		var_dump($entry);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I am sure I am missing something very basic... Just cannot find a way. Any ideas? Thanks!&#60;/p&#62;
&#60;p&#62;And (basics again) when do I use just:&#60;br /&#62;
global $form and when do I use that:&#60;br /&#62;
$form = RGFormsModel::get_form_meta('11');&#60;/p&#62;
&#60;p&#62;Is there some documentation on RGFormsModel:: stuff. I am not a coder so struggling with those syntax bits.&#60;/p&#62;
&#60;p&#62;In the above example global $form did not seem to work...
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
