<?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: Confirm reservation via confirmation link in email</title>
		<link>https://legacy.forums.gravityhelp.com/topic/confirm-reservation-via-confirmation-link-in-email</link>
		<description>Gravity Support Forums Topic: Confirm reservation via confirmation link in email</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 16:20:54 +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/confirm-reservation-via-confirmation-link-in-email" rel="self" type="application/rss+xml" />

		<item>
			<title>e-rik on "Confirm reservation via confirmation link in email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/confirm-reservation-via-confirmation-link-in-email#post-225816</link>
			<pubDate>Fri, 26 Apr 2013 16:22:58 +0000</pubDate>
			<dc:creator>e-rik</dc:creator>
			<guid isPermaLink="false">225816@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi David,&#60;br /&#62;
Thanks for pointing me to the right hook. I've got this working. Here's the code I put in functions.php:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_pre_submission&#38;quot;, &#38;quot;random_value_in_hidden_field&#38;quot;);
function random_value_in_hidden_field($form){
    $_POST[&#38;quot;input_3&#38;quot;] = md5(rand(0,time()));
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This I put in the notification email:&#60;br /&#62;
&#60;code&#62;&#38;lt;a href=&#38;quot;http:/mydomain.com/confirmation-page?usercode={Usercode:3}&#38;quot;&#38;gt;Confirm your registration&#38;lt;/a&#38;gt;&#60;/code&#62;&#60;br /&#62;
And this went in the confirmation page's php template:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
if (empty($_GET)){}
else {
	if (empty($_GET[&#38;quot;usercode&#38;quot;])) {}
	else {
		$uc = $_GET[&#38;quot;usercode&#38;quot;];
		$sql = &#38;quot;SELECT * FROM &#38;lt;code&#38;gt;wp_rg_lead_detail&#38;lt;/code&#38;gt; WHERE &#38;lt;code&#38;gt;value&#38;lt;/code&#38;gt; = &#38;#39;$uc&#38;#39;&#38;quot;;
		$myrows = $wpdb-&#38;gt;get_row( $sql, ARRAY_A );
		if (empty($myrows)) {}
		else {
			$lead_id = $myrows[&#38;quot;lead_id&#38;quot;];
			$wpdb-&#38;gt;update( &#38;#39;wp_rg_lead_detail&#38;#39;, array(&#38;#39;value&#38;#39; =&#38;gt; 1) , array( &#38;#39;lead_id&#38;#39; =&#38;gt; $lead_id, &#38;#39;field_number&#38;#39; =&#38;gt; 4) );
		}
	}
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Now a final cherry on the cake would be a second email to the client to confirm the confirmation of his registration was succesfully processed. Any chance there would be a way to do that with GF? Or should I just send an oldskool email from the same confirmation page by php?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Confirm reservation via confirmation link in email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/confirm-reservation-via-confirmation-link-in-email#post-225357</link>
			<pubDate>Fri, 26 Apr 2013 09:14:39 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">225357@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You are totally on the right track, and outlining exactly what I was thinking when you asked the question. &#60;/p&#62;
&#60;p&#62;I would use gform_pre_submission as the hook to create the random key (maybe a md5 hash of two combined field values) and place it in the hidden field.&#60;/p&#62;
&#60;p&#62;For the second part, you can have a hidden field with a default value of 0. The user would click on the link and go to your specially created Verify page. It would just use a mysql command to search for the key, and if it found it, then update the entry to have a 1 instead of a 0.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>e-rik on "Confirm reservation via confirmation link in email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/confirm-reservation-via-confirmation-link-in-email#post-225346</link>
			<pubDate>Fri, 26 Apr 2013 09:08:21 +0000</pubDate>
			<dc:creator>e-rik</dc:creator>
			<guid isPermaLink="false">225346@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks David. Could you point me in the right directions how to do that?&#60;br /&#62;
Here is what I can think of:&#60;/p&#62;
&#60;p&#62;As for the url for approval: That would require a random and dynamically generated code that is stored in the entry, perhaps in a hidden field. Is there a way to let GF generate a random code? Perhaps by dynamically populating the hidden field via a hook that could be programmed to generate a random string? How and where would I place such a hook?&#60;/p&#62;
&#60;p&#62;As for updating the entry: I suppose I could add another hidden field 'confirmed' with a default value of 0 (false). How could I alter this field to 1 (true) programmatically from another page outside GF, using the unique string generated in the previous step to identify the right entry? Would this just be a matter of updating the database entry directly via a query or is there a hook for this?&#60;/p&#62;
&#60;p&#62;tia,&#60;br /&#62;
Erik
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Confirm reservation via confirmation link in email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/confirm-reservation-via-confirmation-link-in-email#post-225325</link>
			<pubDate>Fri, 26 Apr 2013 08:52:55 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">225325@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It is possible, but not built-in. You would have to custom code the URL for approvals and the tool to update the entries when they arrive on the site.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>e-rik on "Confirm reservation via confirmation link in email"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/confirm-reservation-via-confirmation-link-in-email#post-225139</link>
			<pubDate>Fri, 26 Apr 2013 06:25:28 +0000</pubDate>
			<dc:creator>e-rik</dc:creator>
			<guid isPermaLink="false">225139@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This is the scenario: A form to make reservations for an event. After submitting the form, the client receives an email with a confirmation link. This is to avoid somebody makes an unwanted reservation for somebody else. If the client clicks the confirmation link in his email he is routed to a page where his reservation is confirmed. The entry of this client in the entries table of the form is updated. So in the cms the administrator can see in the entries table which clients confirmed their reservation and which clients didn't.&#60;/p&#62;
&#60;p&#62;Is this possible with Gravity Forms?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
