Here’s a quick trick to segment your list based on custom data in WordPress using GravityForms.


Create a new form that asks 1 question and has a hidden field for email.  Make sure you are populating it with the variable ’email’.  GravityForms documentation has lots of info on this part.

The one question should be something like a dropdown or radio button.



You’ll need the Zapier Addon to be able to push the data to your email provider and update their record with the custom field.


Show / Hide the Survey

First, install Shortcode Exec PHP in WordPress.

Then create a shortcode – lets call it SHOWSURVEY1 for this example and paste the code below to it.


if(!empty($_GET["email"])) {
gravity_form(formId, $display_title=false, $display_description=false, $display_inactive=false, $field_values=null, $ajax=false, $tabindex);
} else {} //do nothing if the email was not present




Change ‘formId’ to the number of your gravity form.

Now paste this shortcode in to a post where you want the survey to appear.  Remember to use square brackets around it like [showsurvey1]

Passing the Email

Make sure that you are appending the email variable to the URL of the post you have the shortcode on.



What the Script Does

Simply, it looks for an email in the URL and then shows the specific survey.  If the email is missing then nothing is shown.

When the contact submits their answer it gets posted to Zapier which then you’ll catch and update in your email provider.





Leave a Comment

Your email address will not be published.