<?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: Display Other Function Results with Custom Merge Tag</title>
		<link>https://legacy.forums.gravityhelp.com/topic/display-other-function-results-with-custom-merge-tag</link>
		<description>Gravity Support Forums Topic: Display Other Function Results with Custom Merge Tag</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 01:16:28 +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/display-other-function-results-with-custom-merge-tag" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Display Other Function Results with Custom Merge Tag"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/display-other-function-results-with-custom-merge-tag#post-71149</link>
			<pubDate>Wed, 15 Aug 2012 11:40:44 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">71149@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you for the update.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ian Rogers on "Display Other Function Results with Custom Merge Tag"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/display-other-function-results-with-custom-merge-tag#post-71145</link>
			<pubDate>Wed, 15 Aug 2012 11:18:06 +0000</pubDate>
			<dc:creator>Ian Rogers</dc:creator>
			<guid isPermaLink="false">71145@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Alex- that worked! Thank you. That function you listed is one created by another plugin. The code you gave is a good template for adding other functions into GF. Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Display Other Function Results with Custom Merge Tag"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/display-other-function-results-with-custom-merge-tag#post-71073</link>
			<pubDate>Tue, 14 Aug 2012 17:46:02 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">71073@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I am not familiar with the wpfg_list_favorite_posts(), but I am suspecting it does not return the HTML string, but prints it to the screen. Try the following and let me know if that works for you:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_replace_merge_tags&#38;#39;, &#38;#39;replace_download_link&#38;#39;, 10, 7);
function replace_download_link($text, $form, $entry, $url_encode, $esc_html, $nl2br, $format) {

    //NOTE: this will be the merge tag you enter in the notification text
    $custom_merge_tag = &#38;#39;{download_link}&#38;#39;;

    if(strpos($text, $custom_merge_tag) === false)
        return $text;

    ob_start();
    wpfp_list_favorite_posts();
    $download_link = ob_get_flush();
    $text = str_replace($custom_merge_tag, $download_link, $text);
    return $text;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Ian Rogers on "Display Other Function Results with Custom Merge Tag"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/display-other-function-results-with-custom-merge-tag#post-71052</link>
			<pubDate>Tue, 14 Aug 2012 15:47:27 +0000</pubDate>
			<dc:creator>Ian Rogers</dc:creator>
			<guid isPermaLink="false">71052@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Alex- have you had a chance to look at this? It's been about a week now.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ian Rogers on "Display Other Function Results with Custom Merge Tag"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/display-other-function-results-with-custom-merge-tag#post-69919</link>
			<pubDate>Tue, 07 Aug 2012 13:22:40 +0000</pubDate>
			<dc:creator>Ian Rogers</dc:creator>
			<guid isPermaLink="false">69919@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for the quick response Alex. I am super close, however, I cannot get the function to output the HTML into the notification email. I basically replaced the gform_get_meta with a function wpfp_list_favorite_posts.&#60;/p&#62;
&#60;p&#62;I then inserted {download_link} into the notification section but it's not showing up in the notificaiton email. Is there anything else I need to add?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_replace_merge_tags&#38;#39;, &#38;#39;replace_download_link&#38;#39;, 10, 7);
function replace_download_link($text, $form, $entry, $url_encode, $esc_html, $nl2br, $format) {

    //NOTE: this will be the merge tag you enter in the notification text
    $custom_merge_tag = &#38;#39;{download_link}&#38;#39;;

    if(strpos($text, $custom_merge_tag) === false)
        return $text;

    //NOTE: replace gform_get_meta() with the function that will return the HTML to be displayed.
    $download_link = wpfp_list_favorite_posts();

    $text = str_replace($custom_merge_tag, $download_link, $text);

    return $text;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Display Other Function Results with Custom Merge Tag"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/display-other-function-results-with-custom-merge-tag#post-69898</link>
			<pubDate>Tue, 07 Aug 2012 11:35:43 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">69898@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You actually want to use the gform_replace_merge_tag filter. (&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_replace_merge_tags&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_replace_merge_tags&#60;/a&#62;)&#60;br /&#62;
The following snippet should point you in the right direction. See NOTES section in the snippet.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_replace_merge_tags&#38;#39;, &#38;#39;replace_download_link&#38;#39;, 10, 7);
function replace_download_link($text, $form, $entry, $url_encode, $esc_html, $nl2br, $format) {

    //NOTE: this will be the merge tag you enter in the notification text
    $custom_merge_tag = &#38;#39;{download_link}&#38;#39;;

    if(strpos($text, $custom_merge_tag) === false)
        return $text;

    //NOTE: replace gform_get_meta() with the function that will return the HTML to be displayed.
    $download_link = gform_get_meta($entry[&#38;#39;id&#38;#39;], &#38;#39;gfmergedoc_download_link&#38;#39;);

    $text = str_replace($custom_merge_tag, $download_link, $text);

    return $text;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Ian Rogers on "Display Other Function Results with Custom Merge Tag"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/display-other-function-results-with-custom-merge-tag#post-69766</link>
			<pubDate>Mon, 06 Aug 2012 20:25:12 +0000</pubDate>
			<dc:creator>Ian Rogers</dc:creator>
			<guid isPermaLink="false">69766@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I want to create a custom merge tag that will display the query results from another plugin.&#60;/p&#62;
&#60;p&#62;I am looking for a little more insight than what the Docs can provide here (&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_custom_merge_tags&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_custom_merge_tags&#60;/a&#62;)&#60;/p&#62;
&#60;p&#62;Basically, the other plugin lists favorite posts of the user with the &#60;code&#62;wpfp_list_most_favorited&#60;/code&#62; function. How can I create a merge tag that will call this function and insert the results into a Gravity Forms notification if the form is embedded on a page with the plugin's results?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
