<?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: Pulling a Custom Field from a different post to Notification Space</title>
		<link>https://legacy.forums.gravityhelp.com/topic/pulling-a-custom-field-from-a-different-post-to-notification-space</link>
		<description>Gravity Support Forums Topic: Pulling a Custom Field from a different post to Notification Space</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 08:29:35 +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/pulling-a-custom-field-from-a-different-post-to-notification-space" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "Pulling a Custom Field from a different post to Notification Space"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-a-custom-field-from-a-different-post-to-notification-space#post-66852</link>
			<pubDate>Wed, 18 Jul 2012 11:24:22 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">66852@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Glad you were able to sort it out.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ktrusak on "Pulling a Custom Field from a different post to Notification Space"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-a-custom-field-from-a-different-post-to-notification-space#post-66850</link>
			<pubDate>Wed, 18 Jul 2012 11:20:57 +0000</pubDate>
			<dc:creator>ktrusak</dc:creator>
			<guid isPermaLink="false">66850@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That worked!&#60;/p&#62;
&#60;p&#62;That was my mistake. I was putting in the wrong piece. It works when using that meta key. &#60;/p&#62;
&#60;p&#62;Here is the final code:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter( &#38;#39;gform_notification_email_1&#38;#39;, &#38;#39;route_notification&#38;#39;, 10, 2 );
function route_notification($email_to, $entry) {
	$email_to = get_post_meta(2, &#38;#39;wpcf-email&#38;#39;, true);
	return $email_to;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;[EDITED by Chris Hajer&#60;br /&#62;
to change value of meta key from &#60;em&#62;meta-key&#60;/em&#62; to &#60;em&#62;wpcf-email&#60;/em&#62;]
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ktrusak on "Pulling a Custom Field from a different post to Notification Space"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-a-custom-field-from-a-different-post-to-notification-space#post-66846</link>
			<pubDate>Wed, 18 Jul 2012 11:15:47 +0000</pubDate>
			<dc:creator>ktrusak</dc:creator>
			<guid isPermaLink="false">66846@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sorry for the slow reply&#60;/p&#62;
&#60;p&#62;That is syntax for the Types api (&#60;a href=&#34;http://wp-types.com/documentation/functions/&#34; rel=&#34;nofollow&#34;&#62;http://wp-types.com/documentation/functions/&#60;/a&#62;)&#60;/p&#62;
&#60;p&#62; The meta key in my db was actually &#34;wpcf-email&#34;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Pulling a Custom Field from a different post to Notification Space"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-a-custom-field-from-a-different-post-to-notification-space#post-66737</link>
			<pubDate>Tue, 17 Jul 2012 20:14:33 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">66737@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Based on the code you posted, this is the meta key?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;types_render_field(&#38;quot;email&#38;quot;, array(&#38;quot;raw&#38;quot;=&#38;gt;&#38;quot;false&#38;quot;))&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That whole thing exists as the meta key in the wp_postmeta table?  Can you post a screenshot of the wp_postmeta table record where this value exists, using something like phpMyAdmin?  It seems unlikely that that is the actual meta key but I would just like to confirm.  Thank you
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ktrusak on "Pulling a Custom Field from a different post to Notification Space"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-a-custom-field-from-a-different-post-to-notification-space#post-66733</link>
			<pubDate>Tue, 17 Jul 2012 20:06:00 +0000</pubDate>
			<dc:creator>ktrusak</dc:creator>
			<guid isPermaLink="false">66733@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I wasn't able to get a notification to come through. To make sure we are on the same page here is the code I was using:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter( &#38;#39;gform_notification_email_1&#38;#39;, &#38;#39;route_notification&#38;#39;, 10, 2 );
function route_notification($email_to, $entry) {
	$email_to = get_post_meta(2, &#38;#39;types_render_field(&#38;quot;email&#38;quot;, array(&#38;quot;raw&#38;quot;=&#38;gt;&#38;quot;false&#38;quot;))&#38;#39;, true);
	return $email_to;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Pulling a Custom Field from a different post to Notification Space"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-a-custom-field-from-a-different-post-to-notification-space#post-66631</link>
			<pubDate>Tue, 17 Jul 2012 08:05:34 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">66631@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;If the meta key in your wp_postmeta is indeed &#60;strong&#62;types_render_field(&#34;email&#34;)&#60;/strong&#62; then you can grab the meta value from that key, with post ID 2, like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;get_post_meta(2, &#38;#39;types_render_field(&#38;quot;email&#38;quot;)&#38;#39;, true);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You may have to escape the ( and &#34; in the meta key name (but I don't think so.)  Does that work for you?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Pulling a Custom Field from a different post to Notification Space"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-a-custom-field-from-a-different-post-to-notification-space#post-66630</link>
			<pubDate>Tue, 17 Jul 2012 08:02:49 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">66630@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is this the plugin you are using?&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://wordpress.org/extend/plugins/types/&#34; rel=&#34;nofollow&#34;&#62;http://wordpress.org/extend/plugins/types/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ktrusak on "Pulling a Custom Field from a different post to Notification Space"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-a-custom-field-from-a-different-post-to-notification-space#post-66624</link>
			<pubDate>Tue, 17 Jul 2012 07:53:35 +0000</pubDate>
			<dc:creator>ktrusak</dc:creator>
			<guid isPermaLink="false">66624@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I was trying to pull from post Id 2 and from &#34;types_render_field(&#34;email&#34;)&#34; which is the custom meta field. I was not sure how to properly format those two.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Pulling a Custom Field from a different post to Notification Space"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-a-custom-field-from-a-different-post-to-notification-space#post-66587</link>
			<pubDate>Mon, 16 Jul 2012 23:37:29 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">66587@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You need to determine how the email address is stored and where, then we can help you figure out how best to format this code.  So far, we don't have enough information.  Can you tell us how the email address is stored?  Normally, it would be in the post meta table.  If that is true, we need to know the meta key, and then need the post ID, and we can grab the value and show you how to use it here.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ktrusak on "Pulling a Custom Field from a different post to Notification Space"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pulling-a-custom-field-from-a-different-post-to-notification-space#post-66551</link>
			<pubDate>Mon, 16 Jul 2012 17:43:28 +0000</pubDate>
			<dc:creator>ktrusak</dc:creator>
			<guid isPermaLink="false">66551@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Does anyone know how to format line 3 of this, I pulled the rest from another forum post, but I am pretty terrible with php and couldn't get that line to work right:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter( &#38;#39;gform_notification_email_X&#38;#39;, &#38;#39;route_notification&#38;#39;, 10, 2 );
function route_notification($email_to, $entry) {
	$post-&#38;gt;2;
	$email_to = types_render_field(&#38;quot;email&#38;quot;, array(&#38;quot;raw&#38;quot;=&#38;gt;&#38;quot;false&#38;quot;)));
	return $email_to;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;To clarify I am trying to pull a custom field (email) from a custom post type profile page in to the notification email box.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
