Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've built a Wordpress template file in my custom theme that displays a directory of members from a custom PHP file powered by a MYSQL database. This allows each member to be displayed on a different page displayed from this template.

I want to display a contact form powered by Gravity Forms on each member page- all using the same Gravity Form. This way people can send an email to the member through that member's profile page and in a way that keeps their email address private.

I was hoping to just use a shortcode but Gravity Form shortcodes does not give the ability to change the notification email address.

I could use a Gravity Forms function, but how do I change the notification email within a function?

The email address is already set as a PHP string but is set from a non-WordPress included file.

I did research this question including at the Gravity Forms support forum but without success. One option recommended to me was to send the notification email address as a hidden field in the form. I want to avoid this because I want to keep this email private. There may be other options open to me but as I am new to Gravity Forms and WordPress I could do with some help!


share|improve this question
add comment

1 Answer

Either of these filters should help you:

  1. gform_autoresponder_email - Sent to User
  2. gform_notification_email - Sent to Admin
share|improve this answer
Thanks, I think gform_notification_email is the one to use. The issue is since this filter has to be added to my functions.php file, how do I pass the string containing the email address of the member to gform_notification_email ? –  baritoneuk Jul 12 '12 at 9:55
Check the documentation man! –  Rutwick Gangurde Jul 12 '12 at 10:25
I have read the documentation, but it doesn't make it clear what I have to do in this case. That was why I was asking the question here. I don't see how I can pass a variable from a PHP script to Gravity forms by using the functions.php file. I am new to WordPress and was hoping that I could find some help here. Thanks. –  baritoneuk Jul 12 '12 at 11:59
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.