<?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: GET form field entries for use in PHP-function</title>
		<link>https://legacy.forums.gravityhelp.com/topic/get-form-field-entries-for-use-in-php-function</link>
		<description>Gravity Support Forums Topic: GET form field entries for use in PHP-function</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 02:35:18 +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/get-form-field-entries-for-use-in-php-function" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "GET form field entries for use in PHP-function"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-form-field-entries-for-use-in-php-function#post-130758</link>
			<pubDate>Thu, 24 Jan 2013 21:40:15 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">130758@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for posting your solution here.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leanderb on "GET form field entries for use in PHP-function"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-form-field-entries-for-use-in-php-function#post-125145</link>
			<pubDate>Fri, 18 Jan 2013 06:14:51 +0000</pubDate>
			<dc:creator>leanderb</dc:creator>
			<guid isPermaLink="false">125145@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I dit it. Following is my solution to grab the values entered into the form and build a customized redirection-URL-array. Just check for the corresponding field-names (&#34;input_X&#34;, provided by GF) in your HTML-output and enter those. You may not need to define the variables ($firstname = $_POST[&#34;input_3&#34;];) like I did, but that's 'cleaner' IMHO.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_confirmation&#38;quot;, &#38;quot;custom_confirmation&#38;quot;, 10, 4);
function custom_confirmation($confirmation, $form, $lead, $ajax){

$firstname = $_POST[&#38;quot;input_3&#38;quot;];
$lastname = $_POST[&#38;quot;input_4&#38;quot;];
$email = $_POST[&#38;quot;input_2&#38;quot;];

    if($form[&#38;quot;id&#38;quot;] == &#38;quot;1&#38;quot;){
		$confirmation = array(&#38;#39;redirect&#38;#39; =&#38;gt; &#38;#39;https://billing.micropayment.de/ebank2pay/event/?&#38;#39; . &#38;#39;firstname=&#38;#39; . $firstname . &#38;#39;&#38;amp;&#38;#39; . &#38;#39;lastname=&#38;#39; . $lastname  . &#38;#39;&#38;amp;&#38;#39; . &#38;#39;email=&#38;#39; . $email  . &#38;#39;&#38;amp;project=rdstnz&#38;amp;title=Mitgliedsaccount-Er-distanziert-sich&#38;amp;amount=200&#38;#39;);
    }

    return $confirmation;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leanderb on "GET form field entries for use in PHP-function"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-form-field-entries-for-use-in-php-function#post-124602</link>
			<pubDate>Thu, 17 Jan 2013 15:50:18 +0000</pubDate>
			<dc:creator>leanderb</dc:creator>
			<guid isPermaLink="false">124602@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;OK, but even the first condition (see above, I used $lead instead of $entry) doesn't provide me with a correct output. All I get is &#34;1&#34; (don't know where that is coming from).&#60;/p&#62;
&#60;p&#62;I double-checked, that the confirmation-code is working correctly ($remember = 'SOME-TEXT-VALUE';). What am I doing wrong? What is the correct use of $lead? Or do I need to pull those values differently?&#60;/p&#62;
&#60;p&#62;Sorry for causing trouble, but I am simply stuck.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "GET form field entries for use in PHP-function"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-form-field-entries-for-use-in-php-function#post-124551</link>
			<pubDate>Thu, 17 Jan 2013 14:16:58 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">124551@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;$lead and $entry are used nearly interchangeably.  Just change $entry in your code to $lead, since $lead is what is passed to the gform_confirmation filter.  I should not be able to see $entry in your code at all when you're done.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leanderb on "GET form field entries for use in PHP-function"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-form-field-entries-for-use-in-php-function#post-124538</link>
			<pubDate>Thu, 17 Jan 2013 13:59:35 +0000</pubDate>
			<dc:creator>leanderb</dc:creator>
			<guid isPermaLink="false">124538@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey Chris,&#60;/p&#62;
&#60;p&#62;thanks for your swift reply. I virtually found nothing on the use of $lead and am unsure if this will function for my case.&#60;/p&#62;
&#60;p&#62;Here goes my code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_confirmation&#38;quot;, &#38;quot;custom_confirmation&#38;quot;, 10, 4);
function custom_confirmation($confirmation, $form, $lead, $ajax){

	$remember = $lead[&#38;#39;1.3&#38;#39;];

	if($form[&#38;quot;id&#38;quot;] == &#38;quot;1&#38;quot;){
        $confirmation = print_r($remember);
    }
    else if($form[&#38;quot;id&#38;quot;] == &#38;quot;101&#38;quot;){
        $confirmation = array(&#38;#39;redirect&#38;#39; =&#38;gt; &#38;#39;https://billing.micropayment.de/ebank2pay/event/?&#38;#39; . &#38;#39;firstname=&#38;#39; . $firstname . &#38;#39;&#38;amp;&#38;#39; . &#38;#39;lastname=&#38;#39; . $entry[&#38;#39;1.4&#38;#39;]  . &#38;#39;&#38;amp;&#38;#39; . &#38;#39;email=&#38;#39; . $entry[&#38;#39;1.2&#38;#39;]  . &#38;#39;&#38;amp;project=rdstnz&#38;amp;title=Mitgliedsaccount-Er-distanziert-sich&#38;amp;amount=200&#38;#39;);
    }

    return $confirmation;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I use the first IF-condition to test/debug. The second one is what I am trying to accomplish: I need the $entries to be inserted into the URL-query.&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "GET form field entries for use in PHP-function"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-form-field-entries-for-use-in-php-function#post-124522</link>
			<pubDate>Thu, 17 Jan 2013 13:39:11 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">124522@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;If you are using the gform_confirmation filter, you should be using $lead, not $entry.  Documentation: &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_confirmation&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_confirmation&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;If you need more help, please provide all the code, including the filter,  here so we can see exactly how you're doing things.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>leanderb on "GET form field entries for use in PHP-function"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-form-field-entries-for-use-in-php-function#post-124515</link>
			<pubDate>Thu, 17 Jan 2013 13:33:57 +0000</pubDate>
			<dc:creator>leanderb</dc:creator>
			<guid isPermaLink="false">124515@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;OK, I'm really stuck with something very simple (I guess) – I looked all over the place but couldn't find an answer.&#60;/p&#62;
&#60;p&#62;I want to re-write the confirmation-URL via gform_confirmation to dynamically build from the entries made:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($form[&#38;quot;id&#38;quot;] == &#38;quot;1&#38;quot;){
        $confirmation = array(&#38;#39;redirect&#38;#39; =&#38;gt; &#38;#39;https://billing.micropayment.de/ebank2pay/event/?&#38;#39; . &#38;#39;firstname=&#38;#39; . $entry[&#38;#39;1.3&#38;#39;] . &#38;#39;&#38;amp;&#38;#39; . &#38;#39;lastname=&#38;#39; . $entry[&#38;#39;1.4&#38;#39;]  . &#38;#39;&#38;amp;&#38;#39; . &#38;#39;email=&#38;#39; . $entry[&#38;#39;1.2&#38;#39;]  . &#38;#39;&#38;amp;project=rdstnz&#38;amp;title=Mitgliedsaccount-Er-distanziert-sich&#38;amp;amount=200&#38;#39;);
    }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;All my $entry-calls are left blank upon confirmation/submission. How do I manage to get the field-values? Would you kindly provide a simple code to call upon a form entry? Then I could implement that one and move on...&#60;/p&#62;
&#60;p&#62;Thanks &#38;amp; sorry for my poor PHP-skills.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
