Under "Notification to Administrator" you can set the reply-to address to:
- either one or multiple manually entered adresses
- OR choose an address from the form with the dropdown box
How can I set this to both?
We are organizing a campaign where people can express their ideas to politicians, and give the politicians a chance to reply back.
What I want to achieve is:
- user fills out a form and expresses his ideas
- the form sends an email to the politician
- when the politician replies to the mail, I want the reply go to:
1) the person who send the mail AND
2) our own email address
(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).
I have searced the forums, and I think I need to add a filter to my theme's functions.php
I found this thread: http://forum.gravityhelp.com/topic/in-replace_variables-what-is
Which is related. But am not sure how to change the codesnippet in that thread to achieve what I want.
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.
Perhaps you put a AND/OR selector in. So that you can choose between:
1) manually entered OR from drowndown box
2) manually entered AND from dropdown box
Finally something I noticed, that you could perhaps find a way to improve in a future revision.
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.
* codesnippet fromGF's notification.php:
<input type="text" name="form_notification_reply_to" id="form_notification_reply_to" onkeydown="jQuery('#form_notification_reply_to_field').val('');" value="<?php echo esc_attr($form["notification"]["replyTo"]) ?>" class="fieldwidth-2" />
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.
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.
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 "save settings" .. the manually entered reply-to address gets discarded without warning).
Perhaps you can change the "onkeydown" to "onchange" or else to " "onfocus" with perhaps some extra code to check if something was filled in, in the manual reply-address.
Hope this makes sense.