<?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: How to set &#34;reply to&#34; for notifications to: my own address AND senders address</title>
		<link>https://legacy.forums.gravityhelp.com/topic/how-to-set-reply-to-for-notifications-to-my-own-address-and-senders-address</link>
		<description>Gravity Support Forums Topic: How to set &quot;reply to&quot; for notifications to: my own address AND senders address</description>
		<language>en-US</language>
		<pubDate>Tue, 07 Apr 2026 20:01:40 +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/how-to-set-reply-to-for-notifications-to-my-own-address-and-senders-address" rel="self" type="application/rss+xml" />

		<item>
			<title>STB on "How to set &#34;reply to&#34; for notifications to: my own address AND senders address"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-set-reply-to-for-notifications-to-my-own-address-and-senders-address#post-12614</link>
			<pubDate>Fri, 12 Nov 2010 19:23:38 +0000</pubDate>
			<dc:creator>STB</dc:creator>
			<guid isPermaLink="false">12614@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Alex helped me solve this.&#60;br /&#62;
I wish to thank him for his skillful and friendly support.&#60;br /&#62;
Really superb support guys.&#60;/p&#62;
&#60;p&#62;I am putting the final solution up here, so others can benefit from it as well.&#60;/p&#62;
&#60;p&#62;The following code does the trick:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_submission_filter&#38;quot;, &#38;quot;add_replyto&#38;quot;);
function add_replyto($form){

    //Change numbers to your actual form id
    if($form[&#38;quot;id&#38;quot;] != 3)
        return $form;

    //Change input_2 with your actual input names
    //Change &#60;a href=&#34;mailto:mymail@example.com&#34;&#62;mymail@example.com&#60;/a&#62; to your actual emailaddress
    $form[&#38;quot;notification&#38;quot;][&#38;quot;replyTo&#38;quot;] = $_POST[&#38;quot;input_2&#38;quot;] . &#38;quot;,mymail@example.com&#38;quot;;

    return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;1) You will need to put this code in your theme's function.php&#60;br /&#62;
(Note: this means the code will keep working if you update the plugin. But just in case you switch theme, you would have to put this code in your new theme's funtion.php)&#60;/p&#62;
&#60;p&#62;2) You need to make sure that you dont have anything in the reply-to fields for admin notification. That means ..&#60;br /&#62;
- no email in the manual reply-to addressbox,&#60;br /&#62;
- but *also* make sure the drop-down box is *not* set to an email field&#60;br /&#62;
(I went wrong here by overlooking this)&#60;/p&#62;
&#60;p&#62;3) You have to change the following In the code to match your situation:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
if($form[&#34;id&#34;] != 3)&#60;br /&#62;
set this to the form ID you want this code to work on&#60;/p&#62;
&#60;p&#62;$_POST[&#34;input_2&#34;]&#60;br /&#62;
set this to the name of the formfield holding the emailaddress of the person filling out the form&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;mailto:mymail@example.com&#34;&#62;mymail@example.com&#60;/a&#62;&#60;br /&#62;
set this to your own emailaddress that you also want to show up in the reply-to field&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Thanks and cheers!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>STB on "How to set &#34;reply to&#34; for notifications to: my own address AND senders address"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-set-reply-to-for-notifications-to-my-own-address-and-senders-address#post-12592</link>
			<pubDate>Fri, 12 Nov 2010 13:20:28 +0000</pubDate>
			<dc:creator>STB</dc:creator>
			<guid isPermaLink="false">12592@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I take it you meant the &#34;reply-to&#34; email field for admin notification Alex.&#60;br /&#62;
(and not the &#34;send-to&#34; email field)&#60;/p&#62;
&#60;p&#62;The reply-to field is empty indeed.&#60;/p&#62;
&#60;p&#62;I send you an email with the login.&#60;br /&#62;
Thank you in advance once again.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "How to set &#34;reply to&#34; for notifications to: my own address AND senders address"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-set-reply-to-for-notifications-to-my-own-address-and-senders-address#post-12591</link>
			<pubDate>Fri, 12 Nov 2010 12:56:47 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">12591@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Make sure you don't have an email field selected on the notification admin page.&#60;br /&#62;
If that is not the case, send me an WP admin login to &#60;a href=&#34;mailto:alex@rocketgenius.com&#34;&#62;alex@rocketgenius.com&#60;/a&#62; and a link to your site and I will take a closer look
&#60;/p&#62;</description>
		</item>
		<item>
			<title>STB on "How to set &#34;reply to&#34; for notifications to: my own address AND senders address"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-set-reply-to-for-notifications-to-my-own-address-and-senders-address#post-12588</link>
			<pubDate>Fri, 12 Nov 2010 12:21:11 +0000</pubDate>
			<dc:creator>STB</dc:creator>
			<guid isPermaLink="false">12588@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks a lot really for your speedy help Alex!&#60;br /&#62;
But its not working quiet yet.&#60;/p&#62;
&#60;p&#62;I tried using your code in 2 ways.&#60;/p&#62;
&#60;p&#62;*formid=3&#60;br /&#62;
*name of inputfield for users email=&#34;input_2&#34;&#60;/p&#62;
&#60;p&#62;1) first way:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_submission_filter&#38;quot;, &#38;quot;add_replyto&#38;quot;);
function add_replyto($form){

    //Change numbers to your actual form id
    if($form[&#38;quot;id&#38;quot;] != 3)
        return;

    //Change input_2 and input_3 with your actual input names
    $form[&#38;quot;notification&#38;quot;][&#38;quot;replyTo&#38;quot;] = $_POST[&#38;quot;input_2&#38;quot;] . &#38;quot;,mymail@example.com&#38;quot;;

    return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;2) second way:&#60;br /&#62;
I added an invisible emailfield to the form (that is, only visible to admins)&#60;br /&#62;
this field had the name &#34;input_6&#34;&#60;br /&#62;
and then used this code:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_submission_filter&#38;quot;, &#38;quot;add_replyto&#38;quot;);
function add_replyto($form){

    //Change numbers to your actual form id
    if($form[&#38;quot;id&#38;quot;] != 3)
        return;

    //Change input_2 and input_3 with your actual input names
    $form[&#38;quot;notification&#38;quot;][&#38;quot;replyTo&#38;quot;] = $_POST[&#38;quot;input_2&#38;quot;] . &#38;quot;,&#38;quot; . $_POST[&#38;quot;input_6&#38;quot;];

    return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;But for some reason, both ways .. only the senders email is put into the reply-to header field&#60;/p&#62;
&#60;p&#62;Neither the hardcoded &#60;a href=&#34;mailto:mymail@example.com&#34;&#62;mymail@example.com&#60;/a&#62; (1st attempt),&#60;br /&#62;
nor the value of the emailfield with the name &#34;input_6&#34; (2nd attempt)&#60;br /&#62;
are picked up in the reply-to header.&#60;/p&#62;
&#60;p&#62;(I made sure I don't have an email field selected in the admin for the reply to)&#60;/p&#62;
&#60;p&#62;I also tried changing double quotes to single quotes. Shouldnt make a difference here, but tried nonetheless to make sure. But same result.&#60;/p&#62;
&#60;p&#62;Could you please have another look at it? Much appreciated.&#60;br /&#62;
(The first method, hardcoding my own emailaddress in, would be the preferred way for me.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "How to set &#34;reply to&#34; for notifications to: my own address AND senders address"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-set-reply-to-for-notifications-to-my-own-address-and-senders-address#post-12581</link>
			<pubDate>Fri, 12 Nov 2010 10:53:28 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">12581@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for the tip on the small &#34;bug&#34; on the notification script. It makes sense and I will make the change.&#60;br /&#62;
As for your reply to field, you will have to build it from scratch using a hook. Following is a code snippet for it. (Make sure you don't have an email field selected in the admin for the reply to as that will override the reply to field from this hook)&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_submission_filter&#38;quot;, &#38;quot;add_replyto&#38;quot;);
function add_replyto($form){

    //Change 84 to your actual form id
    if($form[&#38;quot;id&#38;quot;] != 84)
        return;

    //Change input_2 and input_3 with your actual input names
    $form[&#38;quot;notification&#38;quot;][&#38;quot;replyTo&#38;quot;] = $_POST[&#38;quot;input_2&#38;quot;] . &#38;quot;,&#38;quot; . $_POST[&#38;quot;input_3&#38;quot;];

    return $form;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>STB on "How to set &#34;reply to&#34; for notifications to: my own address AND senders address"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-set-reply-to-for-notifications-to-my-own-address-and-senders-address#post-12571</link>
			<pubDate>Fri, 12 Nov 2010 09:06:01 +0000</pubDate>
			<dc:creator>STB</dc:creator>
			<guid isPermaLink="false">12571@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Under &#34;Notification to Administrator&#34; you can set the reply-to address to:&#60;br /&#62;
- either one or multiple manually entered adresses&#60;br /&#62;
- OR choose an address from the form with the dropdown box&#60;br /&#62;
How can I set this to both?&#60;/p&#62;
&#60;p&#62;_______________&#60;br /&#62;
Background info:&#60;br /&#62;
We are organizing a campaign where people can express their ideas to politicians, and give the politicians a chance to reply back.&#60;/p&#62;
&#60;p&#62;What I want to achieve is:&#60;br /&#62;
- user fills out a  form and expresses his ideas&#60;br /&#62;
- the form sends an email to the politician&#60;br /&#62;
- when the politician replies to the mail, I want the reply go to:&#60;br /&#62;
1)  the person who send the mail AND&#60;br /&#62;
2)  our own email address&#60;/p&#62;
&#60;p&#62;&#60;em&#62;(NB: I am aware that the politician could remove either one of both addresses when replying, but thats okay. I just want both addresses to be put in the reply-to header by default).&#60;/em&#62;&#60;/p&#62;
&#60;p&#62;I have searced the forums, and I think I need to add a filter to my theme's functions.php&#60;br /&#62;
I found this thread: &#60;a href=&#34;http://forum.gravityhelp.com/topic/in-replace_variables-what-is&#34; rel=&#34;nofollow&#34;&#62;http://forum.gravityhelp.com/topic/in-replace_variables-what-is&#60;/a&#62;&#60;br /&#62;
Which is related. But am not sure how to change the codesnippet in that thread to achieve what I want.&#60;/p&#62;
&#60;p&#62;_____________________________________________&#60;/p&#62;
&#60;p&#62;A suggestion for a future release of GF. As it is now, you can EITHER manually choose a 'reply-to' adress OR choose an emailfield from the dropdown.&#60;/p&#62;
&#60;p&#62;Perhaps you put a AND/OR selector in.  So that you can choose between:&#60;br /&#62;
1) manually entered OR from drowndown box&#60;br /&#62;
2) manually entered AND from dropdown box&#60;/p&#62;
&#60;p&#62;_____________________________________________&#60;/p&#62;
&#60;p&#62;Finally something I noticed, that you could perhaps find a way to improve in a future revision.&#60;/p&#62;
&#60;p&#62;When editing notifications, the dropdown box for the reply-to address gets reset as soon as you type something in the manual reply-to field.&#60;/p&#62;
&#60;p&#62;* codesnippet fromGF's notification.php:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;input type=&#38;quot;text&#38;quot; name=&#38;quot;form_notification_reply_to&#38;quot; id=&#38;quot;form_notification_reply_to&#38;quot; onkeydown=&#38;quot;jQuery(&#38;#39;#form_notification_reply_to_field&#38;#39;).val(&#38;#39;&#38;#39;);&#38;quot; value=&#38;quot;&#38;lt;?php echo esc_attr($form[&#38;quot;notification&#38;quot;][&#38;quot;replyTo&#38;quot;]) ?&#38;gt;&#38;quot; class=&#38;quot;fieldwidth-2&#38;quot; /&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;This does check if you typed something with the keyboard in the 'reply to field', but it does not check for putting something in there with your mouse.&#60;/p&#62;
&#60;p&#62;You could copy/paste an emailadress there with the mouse, or if ones browser has stored an emailaddress through the browsers 'auto save formfields' function, you could click the field .. and also choose an emailaddress that way with your mouse.&#60;/p&#62;
&#60;p&#62;Either way, you would end up with both the manual reply-to field having an emailaddress AND the dropdown box having a formfield.  It looks like  you can have both .. (which is not the case, as after pressing &#34;save settings&#34; .. the manually entered reply-to address gets discarded without warning).&#60;/p&#62;
&#60;p&#62;Perhaps you can change the &#34;onkeydown&#34; to &#34;onchange&#34; or else to &#34; &#34;onfocus&#34; with perhaps some extra code to check if  something was filled in, in the manual reply-address.&#60;br /&#62;
Hope this makes sense.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
