So it turns out that everything I’ve been posting lately is really so I can remember what the hell I need to do next time.  This post is no different.

The Situation

I need to create a gravity form inside a Pilot Press protected members area and pass the email variable by getting it from the logged in user.

How To Do It

First, grab this code:

Paste it into your Theme’s functions.php file at the bottom. Save it (of course).

Now create your form in GravityForms, set the email field to ‘Allow field to be populated dynamically’ and enter the hook ‘member_email’ for the parameter name. Just in case you don’t know, do not include the quotes around member_email. Update your form. See this picture.

GravityForms Hidden Email Setup


How do I know to use ‘member_email’ for the parameter?

Easy. You just drop the first part of the code where it says: ‘gform_field_value_’ and you are left with ‘member_email’ which is your parameter.

UPDATE: 10/06/2013

I’ve added an installable plugin that won’t be affected by theme updates. Click Here To Download The ZIP.

2 thoughts on “Insert Office Autopilot & Pilot Press Logged In User Email Into Gravity Forms Hidden Field”

  1. Hi Darren

    Great plugin – I like it a lot. I would like a version to add other ontraport fields prepopulated in the form. Would you be able to provide an update to the plugin to do this?

    Not looking for a freebie – happy to pay

Leave a Comment

Your email address will not be published.