<?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: gform admin pre render</title>
		<link>https://legacy.forums.gravityhelp.com/topic/gform-admin-pre-render</link>
		<description>Gravity Support Forums Topic: gform admin pre render</description>
		<language>en-US</language>
		<pubDate>Tue, 07 Apr 2026 08:40: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/gform-admin-pre-render" rel="self" type="application/rss+xml" />

		<item>
			<title>flauntbooks on "gform admin pre render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-admin-pre-render#post-50978</link>
			<pubDate>Wed, 29 Feb 2012 22:05:32 +0000</pubDate>
			<dc:creator>flauntbooks</dc:creator>
			<guid isPermaLink="false">50978@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have a simple but elegant solution for those of you trying to use pre_render to populate address and name fields.  I found no other way to pre-populate a form...  There is a simple way to process check boxes too.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
$unencode = &#38;#39;&#38;#39;;  // You need to populate the entry data or author_meta here for processing.

add_action(&#38;#39;wp_footer&#38;#39;, &#38;#39;pre_render_fields&#38;#39;, 9999);  // add action to load the jQuery population of form fields.
function pre_render_fields(){

?&#38;gt;
&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
	jQuery(document).ready(function($){
		&#38;lt;?php foreach($unencode as $key =&#38;gt; $val){
			// Check Array to only populate fields with a &#38;quot;.&#38;quot; period.
			if(strpos($key, &#38;#39;.&#38;#39;) !== false &#38;amp;&#38;amp; $val !=== &#38;#39;&#38;#39;){
				echo &#38;#39;$(&#38;quot;#input_6_&#38;#39;.str_replace(&#38;#39;.&#38;#39;, &#38;#39;_&#38;#39;,$key).&#38;#39;&#38;quot;).val(&#38;quot;&#38;#39;.$val.&#38;#39;&#38;quot;);&#38;#39;;
			}
		} ?&#38;gt;
	});
&#38;lt;/script&#38;gt;
&#38;lt;?php } ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;For checkboxes you can use something like this below:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;echo &#38;#39;$(&#38;quot;#choice_&#38;#39;.str_replace(&#38;#39;.&#38;#39;, &#38;#39;_&#38;#39;,$key).&#38;#39;&#38;quot;).prop(&#38;quot;checked&#38;quot;, true);&#38;#39;;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Alex on "gform admin pre render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-admin-pre-render#post-47545</link>
			<pubDate>Fri, 27 Jan 2012 14:19:06 +0000</pubDate>
			<dc:creator>Alex</dc:creator>
			<guid isPermaLink="false">47545@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Alex,&#60;/p&#62;
&#60;p&#62;Thanks for this. Let me start coding and I'll update you on how it goes...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "gform admin pre render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-admin-pre-render#post-47475</link>
			<pubDate>Thu, 26 Jan 2012 20:09:50 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">47475@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello Alex,&#60;br /&#62;
I can give you hand with this.&#60;br /&#62;
The gform_admin_pre_render is only fired on the entry detail page, so you won't see your custom choices on the notification page.&#60;/p&#62;
&#60;p&#62;It seems to me that what you need to be using is either the gform_autoresponder_email or the gform_notification_email. Both of them let you change the list of email address that the notifications are sent to. The difference is that gform_autoresponder_email applies to the user notification emails and gform_notification_email applies to the admin notification emails.&#60;br /&#62;
The idea is to use one of these hooks and test if &#34;gsm&#34; was checked. If so, add the extra email address to the list of emails. The following pages have some examples on how to use these hooks&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_autoresponder_email&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_autoresponder_email&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_notification_email&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_notification_email&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Good luck and let me know if you need any more help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex on "gform admin pre render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-admin-pre-render#post-47314</link>
			<pubDate>Wed, 25 Jan 2012 10:29:43 +0000</pubDate>
			<dc:creator>Alex</dc:creator>
			<guid isPermaLink="false">47314@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;surely someone here knows how to solve this?!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex on "gform admin pre render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-admin-pre-render#post-47129</link>
			<pubDate>Mon, 23 Jan 2012 08:25:17 +0000</pubDate>
			<dc:creator>Alex</dc:creator>
			<guid isPermaLink="false">47129@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;i can't get my gform admin pre render to work. here's my code:&#60;br /&#62;
&#60;a href=&#34;http://pastebin.com/e63v8RXA&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/e63v8RXA&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Nothing shows in the notification settings of any form. I want 'gsm' to appear as an option for me to route email. technically there may be an easier solution.&#60;/p&#62;
&#60;p&#62;The 'gsm' value of 'src' is generated via a cookie that I solved from this topic:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/gform-pre-render-and-cookies&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/gform-pre-render-and-cookies&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;If gsm appears in the form (which has been tried and tested) I want the form to be sent to an additional email. Is gform_admin_pre_render the best way to do this, and if yes, why this code isn't working
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
