Silent Member Registration During Gravity Forms Survey

Hi, I would like to do the following:

When User fills up a Gravity Form and presses the “submit” button, the following actions should be triggered:

1. automatically create Membership 2 Pro user (on the background) with the supplied data and send confirmation link (e-mail) to user.

2. at the same time login the new user AND (right after that)

3. automatically redirect to external page

I allready installed & setup “User registration” addon in Gravity Forms .

I found several threads about redirecting users after filling up registration form, but then membership levels are shown and I don’t wat to have any clicks of the user, it should all be done automatically.

Hope you can help me out here.

Thanks,

Merijn

  • Adam Czajczyk
    • Support Gorilla

    Hello Merjin,

    I hope you’re well today and thank you for your question!

    The Membership 2 Pro plugin can work with Gravity Forms so GF with registration extension would be used for user/member registration and it can also perform a redirect. However, the scenario that you described is not possible out of the box.

    The Membership 2 Pro includes an API though that can be utilized here.

    This would require some custom coding though and the workflow would be like this:

    1. Setup GF for user registration and disable Membership 2 Pro registration form/flow by adding this line to functions.php file of your current theme (of the main site) or better yet as an MU plugin:

    add_filter('ms_frontend_handle_registration', '__return_false');

    2. Hook up your custom code (added as mu plugin as well) to the WP registration process so it would be fired after the user account is created

    3. Create the code based on Membership 2 Pro API (described in-plugin on “Membership 2 -> Help -> API Docs” page in your site’s admin area) that will automatically assign defined membership to the newly created user and after that redirect that user to the specified site.

    This is doable but it requires a custom coding. If you feel like dealing with this yourself, please feel free to ask any questions and I’ll be happy to help. If you need it however to be fully developed for you, you may want to post a question on our “Jobs & Pros” job board (please note: no WPMU DEV staff involved!) here:

    https://premium.wpmudev.org/wordpress-development/

    Best regards,

    Adam

  • Merijn
    • Design Lord, Child of Thor

    Hi, I think I was not clear in my question, let me rephrase.

    It is is not (yet) a multisite.

    When Site Visitor fills up a Gravity Form survey and presses the “submit” button, the following actions should be triggered:

    1. automatically create Membership 2 Pro Free Member (on the background) with the supplied data and send Membership confirmation link (e-mail) to new member (with login credentials).

    2. at the same time login the new member AND (right after that)

    3. automatically redirect to external page

    I allready installed & setup “User registration” addon in Gravity Forms .

    Would the same solution work here?

    Thanks,

    Merijn

  • Adam Czajczyk
    • Support Gorilla

    Hello Merjin!

    I just read both your initial question and my replay again and I admit I don’t know how I came up with “multisite idea” since you didn’t mention that. I’m sorry for that :slight_smile:

    The solution however would be exactly the same here. Using only available tools user would need to go through the membership choice or at least confirmation of membership selection. If you wish to make it run all “in the background” as described in your first post, some custom coding based on Membership 2 API (and possibly Gravity Forms API too) would be necessary.

    Best regards,

    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.