How to create a contact form that sends an email to the author with Gravity Forms

Using the Gravity Forms advanced Allow field to be populated dynamically option will allow you to automatically populate a hidden field with the authors email address.

We use  Gravity Forms on all our websites as it is a fantastic form builder system and highly recommended.

Once you create a contact form that will be placed on a listing page or in the author box contact tab add an additional Email Field and call it Author Email.

Add an Email Field

In order to configure your Gravity Forms notification emails you need to use the Email field type. Edit your form and select Advanced Fields and click the Email field type to add it to your form.

Select the Email field you created to display the options for that field. Rename it to say Agent Email then open the Advanced section.

Hide the Email Field and populate it dynamically

In the Email field Advanced section select the Hidden option to hide the field on the form. 

In the Advanced section, select the option to Allow field to be populated dynamically and insert author_email in the Parameter Name option. The parameter author_email is built into Easy Property Listings.

The author_email parameter will automatically add the author's email address to the form when the listing is viewed.

Now save your form and head over to Form Settings > Notifications and edit the Admin Notification.

You can now set the Send To option to Select a Field and choose your hidden Author Email address. When a customer submits an enquiry the Admin Notification will be sent directly to the author/agent who can respond to the client and help them with their enquiry.


More fields you can fill (3.6) #

Set up a hidden field the same way (Advanced > Allow field to be populated dynamically) and use one of these as the Parameter Name:

Parameter Name Fills the field with Function
author_email The listing author's email (on an author page: that author's email) epl_populate_post_author_email()
author_email_secondary The listing's second agent's email. Empty when there is no second agent. epl_populate_secondary_author_email()
primary_agent_email The primary agent's email. On a Staff Directory page, that staff member's email. epl_populate_primary_agent_email()
primary_agent_name The primary agent's name epl_populate_primary_agent_name()
property_unique_id The listing's unique ID from your CRM epl_populate_property_unique_id()
property_office_id The listing's office ID from your CRM epl_populate_property_office_id()

Use author_email_secondary as a CC on the notification so both agents get the enquiry. The unique and office IDs help when enquiries are sent on to your CRM.

Each one is a Gravity Forms gform_field_value_{parameter} filter in lib/includes/options-global.php.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.