<?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: Dynamically populate field within template file</title>
		<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-field-within-template-file</link>
		<description>Gravity Support Forums Topic: Dynamically populate field within template file</description>
		<language>en-US</language>
		<pubDate>Tue, 14 Apr 2026 22:46:25 +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/dynamically-populate-field-within-template-file" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Dynamically populate field within template file"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-field-within-template-file#post-149558</link>
			<pubDate>Mon, 18 Feb 2013 18:31:12 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">149558@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Glad you worked it out.  Sorry about the typo..  I think it is related to the format of the array you were trying to fake in the first example.  So we worked around it by using the do_shortcode and a different format for the parameters.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ronimarin on "Dynamically populate field within template file"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-field-within-template-file#post-149485</link>
			<pubDate>Mon, 18 Feb 2013 16:03:44 +0000</pubDate>
			<dc:creator>ronimarin</dc:creator>
			<guid isPermaLink="false">149485@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Funny, actually pretty strange that it does work with do_shortcode :confused:&#60;/p&#62;
&#60;p&#62;You made a small mistake with variable, it should be like this, then it works:&#60;br /&#62;
&#60;code&#62;echo do_shortcode(&#38;#39;[gravityform id=\&#38;#39;1\&#38;#39; title=\&#38;#39;false\&#38;#39; description=\&#38;#39;false\&#38;#39; field_values=\&#38;#39;owneremail=&#38;#39;.$o_email.&#38;#39;\&#38;#39;]&#38;#39;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Thanks for helping out.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Dynamically populate field within template file"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-field-within-template-file#post-149333</link>
			<pubDate>Mon, 18 Feb 2013 11:42:39 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">149333@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I suspect it has something to do with the $owneremail not truly being an array, but trying to look like one. I'm not sure what's wring with your array of parameter values exactly, but maybe you can approach is another way:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
echo do_shortcode(&#38;quot;[gravityform id=\&#38;quot;1\&#38;quot; title=\&#38;quot;false\&#38;quot; description=\&#38;quot;false\&#38;quot; field_values=\&#38;quot;owneremail=$o_email\&#38;quot;]&#38;quot;);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>ronimarin on "Dynamically populate field within template file"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-field-within-template-file#post-148953</link>
			<pubDate>Mon, 18 Feb 2013 03:42:16 +0000</pubDate>
			<dc:creator>ronimarin</dc:creator>
			<guid isPermaLink="false">148953@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I want to populate a form field with current post custom field that contains email address. I want to do it via template when embedding a form. Form is always the same, just this field needs to be populated in order to send enquiry directly to that email.&#60;/p&#62;
&#60;p&#62;I'm using this chunk of code:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$owneremail = &#38;#39;\&#38;#39;owneremail\&#38;#39;=&#38;gt;\&#38;#39;&#38;#39;.$o_email.&#38;#39;\&#38;#39;&#38;#39;;
echo gravity_form(1, false, false, array($owneremail), &#38;#39;&#38;#39;, false);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;echoing $owneremail gives 'owneremail'=&#38;gt;'example@example.com' which should be fine according to your docs.&#60;br /&#62;
Form has a field that has checkbox ticked to populate dynamically with value owneremail.&#60;/p&#62;
&#60;p&#62;And it doesn't get filled out.&#60;br /&#62;
You can see the form here: &#60;a href=&#34;http://holidaysincroatia.hr/summer/accommodation/apartmani-nije-mi-dobro/#cnt-form&#34; rel=&#34;nofollow&#34;&#62;http://holidaysincroatia.hr/summer/accommodation/apartmani-nije-mi-dobro/#cnt-form&#60;/a&#62;&#60;br /&#62;
WP 3.5.1&#60;br /&#62;
GF 1.6.11
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
