<?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: Modify incoming field data dynamically</title>
		<link>https://legacy.forums.gravityhelp.com/topic/modify-incoming-field-data-dynamically</link>
		<description>Gravity Support Forums Topic: Modify incoming field data dynamically</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 08:20:38 +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/modify-incoming-field-data-dynamically" rel="self" type="application/rss+xml" />

		<item>
			<title>mattswan on "Modify incoming field data dynamically"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/modify-incoming-field-data-dynamically#post-16101</link>
			<pubDate>Thu, 13 Jan 2011 03:51:56 +0000</pubDate>
			<dc:creator>mattswan</dc:creator>
			<guid isPermaLink="false">16101@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi David!&#60;/p&#62;
&#60;p&#62;I am using below code which is working fine for one site, but I am using multi-site functionality and each site have different form id.&#60;/p&#62;
&#60;p&#62;in the below function I am specifying form id so it is not working for all the sites.&#60;br /&#62;
if you do any amendments in that code then it would be good. I will try your code too.&#60;/p&#62;
&#60;p&#62;add_action(&#34;gform_pre_submission&#34;, &#34;pre_submission_handler&#34;);&#60;br /&#62;
function pre_submission_handler($form_meta){&#60;br /&#62;
	global $_POST;&#60;br /&#62;
	// form id 1 is our main contact form&#60;br /&#62;
	if($form_meta[&#34;id&#34;] != '14'){&#60;br /&#62;
		return;&#60;br /&#62;
	}&#60;br /&#62;
	//query to get HotelName and Function Manager Email Address&#60;br /&#62;
	$query = 'SELECT h.HotelName, h.Suburb, hcw.ContactName, hcw.ContactEmail, hcw.ContactPhone, hcw.ContactFax FROM Hotel AS h LEFT JOIN HotelConfWed AS hcw ON h.ID=hcw.HotelID WHERE hcw.AreaID=1502 AND h.ID=&#34;'. $_SESSION[&#34;HotelID&#34;].'&#34;';&#60;/p&#62;
&#60;p&#62;$HDetail = query_chg($query);&#60;/p&#62;
&#60;p&#62;while ($det = mssql_fetch_array($HDetail)) {&#60;br /&#62;
	$_POST[&#34;input_9&#34;] = $det['HotelName'];&#60;br /&#62;
}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Modify incoming field data dynamically"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/modify-incoming-field-data-dynamically#post-16055</link>
			<pubDate>Wed, 12 Jan 2011 14:08:47 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">16055@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Matt,&#60;/p&#62;
&#60;p&#62;Sounds like you want to prepoluate the value of your hidden field using a value provided through PHP. Here's a quick example of how to do that (notes in the code):&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastie.org/1453308&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/1453308&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mattswan on "Modify incoming field data dynamically"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/modify-incoming-field-data-dynamically#post-16026</link>
			<pubDate>Tue, 11 Jan 2011 22:06:09 +0000</pubDate>
			<dc:creator>mattswan</dc:creator>
			<guid isPermaLink="false">16026@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey Carl!&#60;/p&#62;
&#60;p&#62;Thanks for your quick reply, but the Hotel name which I want to pass is I am fetching from the query in php. so is it possible to pass php variable in hidden field?&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Modify incoming field data dynamically"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/modify-incoming-field-data-dynamically#post-15975</link>
			<pubDate>Tue, 11 Jan 2011 13:22:54 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">15975@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@mattswan Yes, you can populate fields via query string.  You need to configure your field so that it can be populated dynamically and then pass the data to it via the query string. See the forum post below, it outlines how to do this.  &#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forum.gravityhelp.com/topic/pass-custom-field-from-a-post-into-a-form-that-post-links-to#post-14327&#34; rel=&#34;nofollow&#34;&#62;http://forum.gravityhelp.com/topic/pass-custom-field-from-a-post-into-a-form-that-post-links-to#post-14327&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mattswan on "Modify incoming field data dynamically"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/modify-incoming-field-data-dynamically#post-15938</link>
			<pubDate>Tue, 11 Jan 2011 02:49:20 +0000</pubDate>
			<dc:creator>mattswan</dc:creator>
			<guid isPermaLink="false">15938@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Carl,&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.grandchifleyhotels.com.au/wedding-enquiry/?HotelID=GCA&#34; rel=&#34;nofollow&#34;&#62;http://www.grandchifleyhotels.com.au/wedding-enquiry/?HotelID=GCA&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;in above link you can see gravity form. I want to pass hotel name in hidden field for this form when form being submitted. is it possible to do that?&#60;/p&#62;
&#60;p&#62;If yes then how?&#60;/p&#62;
&#60;p&#62;Thanks in advance.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hegeman on "Modify incoming field data dynamically"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/modify-incoming-field-data-dynamically#post-9012</link>
			<pubDate>Wed, 25 Aug 2010 14:41:41 +0000</pubDate>
			<dc:creator>hegeman</dc:creator>
			<guid isPermaLink="false">9012@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Carl,&#60;br /&#62;
I'm still fiddling about. I have it partly working. Forget my question for now. There seems to be something else wrong. Some parameters are passed, others not.... I'll figure that out first.&#60;/p&#62;
&#60;p&#62;Thanx, Han
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hegeman on "Modify incoming field data dynamically"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/modify-incoming-field-data-dynamically#post-9011</link>
			<pubDate>Wed, 25 Aug 2010 14:32:09 +0000</pubDate>
			<dc:creator>hegeman</dc:creator>
			<guid isPermaLink="false">9011@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;yes they worked fine when I when I had set it up so that the gravity form got the parameter directly from the url.&#60;br /&#62;
Without the intermediate steps of grabbing it, changing it and feeding it into the form.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Modify incoming field data dynamically"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/modify-incoming-field-data-dynamically#post-9010</link>
			<pubDate>Wed, 25 Aug 2010 14:19:06 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">9010@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Nope, the information comes from the form itself.  So if you are populating the fields dynamically correctly it should save the data in those hidden fields.  When you say those fields worked fine before, are you referring to before you tried to obfuscate them?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hegeman on "Modify incoming field data dynamically"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/modify-incoming-field-data-dynamically#post-9009</link>
			<pubDate>Wed, 25 Aug 2010 14:07:25 +0000</pubDate>
			<dc:creator>hegeman</dc:creator>
			<guid isPermaLink="false">9009@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Carl,&#60;br /&#62;
I'm almost there, I got a test form up and running where the parameters are read from the url and the deobsfuscated code is inserted correctly in two hidden fields in the form. &#60;/p&#62;
&#60;p&#62;But that info in the hidden fields is no longer appearing in the email notification that is sent. Those fields stay blank, whereas before they worked fine. Is that information coming from a different route?&#60;/p&#62;
&#60;p&#62;Unfortunately I cannot send a url as the site is developed behind a firewall.&#60;br /&#62;
Any ideas are appreciated. I'm a bit stuck a this last final tiny step.&#60;/p&#62;
&#60;p&#62;Thank you,&#60;/p&#62;
&#60;p&#62;Han
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hegeman on "Modify incoming field data dynamically"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/modify-incoming-field-data-dynamically#post-9005</link>
			<pubDate>Wed, 25 Aug 2010 13:19:33 +0000</pubDate>
			<dc:creator>hegeman</dc:creator>
			<guid isPermaLink="false">9005@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ah, thanks for your quick response. Exactly what I was looking for.&#60;br /&#62;
I'll give it a try....&#60;/p&#62;
&#60;p&#62;many greetings, Han
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
