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.

auto login after registration specific form only

  1. I'm using gravity and the user registration plug-in. I've read the forum posts about auto-logging-in a user after registration, but the code seems to be for all forms on a site. Can this be done for a specific form only (perhaps by form ID)?

    We have a diverse site, and one of our sponsors would like to make a download available to anyone that wants it, but the site requires membership to access. I've created a new locked down user role for these registrants - but they cannot access the file to download without being logged in to the site.

    If I use the code add into to the functions.php as mentioned here: http://www.gravityhelp.com/forums/topic/user-registration-login-redirect-to-private-page#post-40030

    but that seems to function for ALL gravity forms.

    Posted 12 years ago on Friday June 1, 2012 | Permalink
  2. David Peralty

    It should POST the form_id as well, and as such you should be able to test against that. Try it out and let me know if you can pull that variable. If not, I'll try to find another way to pass it along. Like by storing the form ID in a hidden field and passing that through the entry object.

    Posted 12 years ago on Friday June 1, 2012 | Permalink