<?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: Populate hidden field with PHP multiple times</title>
		<link>https://legacy.forums.gravityhelp.com/topic/populate-hidden-field-with-php-multiple-times</link>
		<description>Gravity Support Forums Topic: Populate hidden field with PHP multiple times</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 01:48: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/populate-hidden-field-with-php-multiple-times" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "Populate hidden field with PHP multiple times"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-hidden-field-with-php-multiple-times#post-23861</link>
			<pubDate>Thu, 21 Apr 2011 12:02:03 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">23861@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes, you can enable AJAX using the function call.  It is discussed int he documentation area for the function call here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Embedding_A_Form&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Embedding_A_Form&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bryan K on "Populate hidden field with PHP multiple times"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-hidden-field-with-php-multiple-times#post-23859</link>
			<pubDate>Thu, 21 Apr 2011 11:44:15 +0000</pubDate>
			<dc:creator>Bryan K</dc:creator>
			<guid isPermaLink="false">23859@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Oh dear. Yup, that's all it took. Thanks! I really should have tried that. :)&#60;/p&#62;
&#60;p&#62;One other question as long as I'm asking: Is there a way to enable AJAX on the gravity_form(2, true, true); thing? I've tried looking around and haven't been able to find that either.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Populate hidden field with PHP multiple times"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-hidden-field-with-php-multiple-times#post-23846</link>
			<pubDate>Thu, 21 Apr 2011 11:08:43 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">23846@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Try putting that filter in your themes functions.php file and not in your loop.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bryan K on "Populate hidden field with PHP multiple times"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-hidden-field-with-php-multiple-times#post-23817</link>
			<pubDate>Thu, 21 Apr 2011 01:37:29 +0000</pubDate>
			<dc:creator>Bryan K</dc:creator>
			<guid isPermaLink="false">23817@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I have a form inside of the loop in a template so it shows up multiple times on a page, so I need to somehow distinguish which form was submitted in the entry information. After poking around on the forum I've come up with this. Sorry it's probably terrible – I'm not super great at PHP:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
add_filter(&#38;quot;gform_field_value_book&#38;quot;, &#38;quot;populate_book&#38;quot;);
function populate_book($value){
   return get_the_title();
}
gravity_form(2, true, true);
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Which prepopulates a hidden field called book with the title of the post the form is part of. It works like a charm until the second post on the page, where there's a fatal PHP error that the populate_book function has already been defined.&#60;/p&#62;
&#60;p&#62;There must be a way to do this, right? Am I going at it the wrong way?&#60;/p&#62;
&#60;p&#62;Thanks so much for any help.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
