<?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 add Wordpress page title to Gravity Form field.</title>
		<link>https://legacy.forums.gravityhelp.com/topic/dynamically-add-wordpress-page-title-to-gravity-form-field</link>
		<description>Gravity Support Forums Topic: Dynamically add Wordpress page title to Gravity Form field.</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 22:08:34 +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-add-wordpress-page-title-to-gravity-form-field" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "Dynamically add Wordpress page title to Gravity Form field."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-add-wordpress-page-title-to-gravity-form-field#post-63654</link>
			<pubDate>Tue, 26 Jun 2012 12:43:56 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">63654@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I hope so too. :) Glad to hear it worked.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ldoherty on "Dynamically add Wordpress page title to Gravity Form field."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-add-wordpress-page-title-to-gravity-form-field#post-63651</link>
			<pubDate>Tue, 26 Jun 2012 11:58:13 +0000</pubDate>
			<dc:creator>ldoherty</dc:creator>
			<guid isPermaLink="false">63651@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes!&#60;/p&#62;
&#60;p&#62;THis code worked!&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php

add_filter(&#38;quot;gform_field_value_product&#38;quot;, &#38;quot;page_title&#38;quot;);

function page_title($form){
$currenttitle = get_the_title();
return $currenttitle;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Wow, my first bit of PHP! Thanks a lot David. &#60;/p&#62;
&#60;p&#62;I hope other people can learn from this also!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Dynamically add Wordpress page title to Gravity Form field."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-add-wordpress-page-title-to-gravity-form-field#post-63650</link>
			<pubDate>Tue, 26 Jun 2012 11:56:59 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">63650@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Really what you want from me is the $currenttitle = get_the_title(); line and then returning that value to your form field.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ldoherty on "Dynamically add Wordpress page title to Gravity Form field."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-add-wordpress-page-title-to-gravity-form-field#post-63649</link>
			<pubDate>Tue, 26 Jun 2012 11:54:29 +0000</pubDate>
			<dc:creator>ldoherty</dc:creator>
			<guid isPermaLink="false">63649@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm giving it a go! &#60;/p&#62;
&#60;p&#62;I added your code to the functions.php page but nothing happened. Do I have to combine your code with mine. For example, using your code, where does it state that the page title will go into the product field on the gravity form?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Dynamically add Wordpress page title to Gravity Form field."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-add-wordpress-page-title-to-gravity-form-field#post-63647</link>
			<pubDate>Tue, 26 Jun 2012 11:46:16 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">63647@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;And as a side note, I'm glad to see you are experimenting. :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Dynamically add Wordpress page title to Gravity Form field."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-add-wordpress-page-title-to-gravity-form-field#post-63646</link>
			<pubDate>Tue, 26 Jun 2012 11:45:56 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">63646@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Here is what I used:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_value_title&#38;quot;, &#38;quot;page_title&#38;quot;);

function page_title($form){
$currenttitle = get_the_title();
return $currenttitle;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>ldoherty on "Dynamically add Wordpress page title to Gravity Form field."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-add-wordpress-page-title-to-gravity-form-field#post-63644</link>
			<pubDate>Tue, 26 Jun 2012 11:42:49 +0000</pubDate>
			<dc:creator>ldoherty</dc:creator>
			<guid isPermaLink="false">63644@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;OK, I am making progress, I have added the code below to the functions.php page and now the date appears in the product field. However, I want the page title to appear in the product field. I therefore need to change the return value from the date to something that will show the page title. What do I add?&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
add_filter(&#38;quot;gform_field_value_product&#38;quot;, &#38;quot;populate_product&#38;quot;);
function populate_product($value){
return &#38;quot;10/10/2010&#38;quot;;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>ldoherty on "Dynamically add Wordpress page title to Gravity Form field."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-add-wordpress-page-title-to-gravity-form-field#post-63641</link>
			<pubDate>Tue, 26 Jun 2012 11:27:01 +0000</pubDate>
			<dc:creator>ldoherty</dc:creator>
			<guid isPermaLink="false">63641@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;OK, &#60;/p&#62;
&#60;p&#62;So I have added the value 'product' to the parameter name in the form field advanced tab. I have to add some PHP code similar to the code below to the functions.php page of the theme.&#60;/p&#62;
&#60;p&#62;How do I change the code below to pass the page title to the field with the parameter name 'product'?&#60;/p&#62;
&#60;p&#62;&#38;lt;?php&#60;br /&#62;
add_filter(&#34;gform_field_value_date&#34;, &#34;populate_date&#34;);&#60;br /&#62;
function populate_date($value){&#60;br /&#62;
   return &#34;10/10/2010&#34;;&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ldoherty on "Dynamically add Wordpress page title to Gravity Form field."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-add-wordpress-page-title-to-gravity-form-field#post-63640</link>
			<pubDate>Tue, 26 Jun 2012 11:14:56 +0000</pubDate>
			<dc:creator>ldoherty</dc:creator>
			<guid isPermaLink="false">63640@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;OK, so I see that I need to add some PHP code to the functions.php page of my theme. Is there an example of PHP code I need to add to add the page title to a form field?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ldoherty on "Dynamically add Wordpress page title to Gravity Form field."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-add-wordpress-page-title-to-gravity-form-field#post-63637</link>
			<pubDate>Tue, 26 Jun 2012 11:12:01 +0000</pubDate>
			<dc:creator>ldoherty</dc:creator>
			<guid isPermaLink="false">63637@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi David,&#60;br /&#62;
I do not have any PHP coding ability! I am OK at following instructions and I am a quick learner but other than that I have no idea!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
