PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Gravity Forms instead of WordPress Password Protected Post

  1. I need to create a WordPress page with information on, but I would like to collect the email addresses of all the people that want to see the page. Can this be done with Gravity Forms and if so could someone help out?

    Basically I want it to work like the WordPress Password Protected Pages/Posts function but instead of entering a password, any valid email address can be entered and of course the results collected by the form.

    Thanks in advance.

    Posted 10 years ago on Friday November 25, 2011 | Permalink
  2. It sounds like there are two parts to this problem, and something in the middle I don't get.

    You need a form to capture email addresses, before showing the visitor the content. Correct?

    What happens to the email address after it's captured? And, does the fact of supplying a valid email get them access to the content? If that's the case, why not have an email field in your form, and once that passes validation, you let them continue by redirecting them to the protected content page? Is it more complex than that?

    Posted 10 years ago on Friday November 25, 2011 | Permalink
  3. Thanks for getting back to me with this.

    You need a form to capture email addresses, before showing the visitor the content. Correct?

    This is correct. The page contain information about job vacancies and my boss only wants to allow people to view the information when their email address is collected. He just wants to get an idea of the people who are applying e.g. whether they are from rival companies etc..!!

    Therefore I would like all this done on 1 page rather than redirecting to other pages. So their could be a gravity form on the page that collects the email and when they submit the form with a valid email it displays the page content.

    Posted 10 years ago on Wednesday November 30, 2011 | Permalink
  4. I don't know of a way to do it with just one page. You only need one form, the one to collect and email address, and once that's collected and validated, you can direct them to the content page. But I can't see how there would be a Gravity Form on a page, and once that's submitted, it shows the content the second time around.

    I guess you could use a custom page template, and in the template say "if this is the first time showing the page, show the form. If we have a successful form submission, then show the content. " I think that would work, if you did it in the page template.

    Otherwise, there is no way I know of the accept and email, any email, and then after that is done, show the content on the same page. That's the big stumbling block: the requirement to show the form and content on the same page. If you remove that requirement, it's no problem and easy to do.

    Posted 10 years ago on Friday December 2, 2011 | Permalink