Membership registration with Gravity Forms

ok, I know it's been asked before but I'm having trouble integrating this and could really use some help. As I figure out the specific steps I'll also post an overview tutorial because the previous posts don't seem to answer this questions in enough detail to create a definitive guide.

1) I'd like to use GF as the user registration form for Membership sign-up on my site.
2) Sales page/registration page offers membership details and when someone clicks on an option it takes them to the GF and passes along the membership variables like membership level of sign-up and pricing.
3) Prospective user enters in login creds and payment information and is then redirected back to the site (welcome page) after their payment has been processed.
4) Form adds them to the specific membership level after payment has been completed.

So far here are a few issues:
1) the test register page doesn't show subscription checkout options with [subscriptionform] unless I add them by hand (like at the bottom) [subscriptionbutton subscription="12"]
2) I'm still not sure how to pass along the specific variables in GF and link the form with the specific member level.
(currently have two hidden fields in the form registering the parameters: subscription and action)
And the form has confirmation variables that Pass Field Data Via Query String with settings: {Register Subscription:12}{Register User:20}
Current form url look like:

Problem: It doesn't work. ;[

I'm sure I'm missing a few pieces in here but wanted to begin the conversation and see how it all could be fixed. Any suggestions on steps to begin accomplishing this?

  • aecnu

    Greetings kathy_darling,

    Thank you for the consideration and putting this out there.

    I am not sure if any of our member coders are able to chip in here or not, but I have no other idea where to go from here since this clearly falls in the realm of custom coding and well beyond the support we provide here

    And the only information I have regarding this is how to address custom forms:

    To override any of the pages generated by membership with your own you can easily define the following in your wp-config

    using ('MEMBERSHIP_****_FORM','/full/server/path/to/file/');

    Does anyone else have some input to possibly help kathy_darling with this project and some custom code?

    Please advise.

    Cheers, Joe

  • kathy_darling

    Update to this thread:
    I've tried to replicate the set-up on a different install and it appears that the theme or other plugins were blocking the registration page from showing the signup box w Membership. It now works and registration can be completed when only Membership is in the loop.

    I've also got a new gravity form set-up to handle registrations but I have no idea how to link the two. Like the previous set-up, I have the same hidden fields but w/ different variables.

    1) Does anyone know how to link the subscription level signup button so it links to the gravity form
    ex -->

    I think that's the only piece I'm missing at this point!! Who's my hero and can answer this last 'simple' question? ;P Almost there...

  • kathy_darling

    Ok. update to the process:

    I can get gravity forms to create someone site with the user registration the specific form, but I still can't seem to get it to play nicely with Membership.

    It'll add them as a user but not within a specific level
    also, it will not currently auto log them in after registration like within Mason's post at

    Do I need to set the blog that it autologgs them into with this line?
    'pi_gravity_registration_autologin', 10, 4 );

    And then specify the blog number in this parameter?

    Finally, anyone have any guidance on getting the hidden fields in gravity forms to pass along the registeruser and subscription paramaters?
    This is the test link from the register page within Membership:

    and this is what I'm adding to the gravity form confirmation with "Pass query data via querry string"
    {Register User:3}{Register Subscription:2}
    Also two hidden fields to define the parameter names: Action and subscription

    What am I missing here if anyone can help weave these last two pieces together.

    One more inch and it's golden. Anyone see what's missing or set-up incorrectly?

  • aecnu

    Greetings kathy_darling,

    Thank you for all the updates which are certainly appreciated.

    I have no idea on how to get this to work or code it as you desire.

    I appreciate pointing out the ticket that Mason commented on, which you did not mention clearly states:

    We have to draw a line between what is "support" and what is "custom". Think of support as helping you implement our product in any of the ways it's meant to "out of the box". Custom work would be anything additional that the plugin doesn't do by default.

    With that said and clarified, if we do know we are certainly not going to withhold the information.

    Hopefully a coder member will come in here and help us resolve this issue which has clearly morphed to some degree as you have made progress.

    Cheers, Joe

  • kathy_darling

    Hey Joe,

    Thanks for the support. I know this is beyond the scope of what is supported by you all. I've seen so many people +1 for this feature that I thought if only I could figure it out, I'd write up the instructions in detail so everyone could implement going forward.

    It seems soo close.

    subscription level signup button so it links to the gravity form
    ex -->

    Just need to build that bridge that links the two if anyone has any thoughts.

    Thanks again Joe for the help.

  • kathy_darling


    I wrote a custom plugin that filters membership_override_payment_form with a custom template that really just calls the Gravity Forms shortcode.

    I've activated my custom plugin on a sub-site and you can see the Membership signup page:

    At first I was (and still am) having trouble advancing through the Gravity Form. But the truly baffling thing is that when logged out (in another browser), filtering the membership_override_payment_form does nothing. Are you seeing the traditional Membership registration forms or do you see the progress bar of the Gravity Form? I must be going crazy, because there's nothing that would make add_filter not applicable for a logged out user and yet I see this both live and locally despite clearing my caches.

    I think this falls back into the purview of using the Membership plugin so hopefully you can help me with it.

  • aecnu

    Greetings kathy_darling,

    Thank you for you detailed input here which is certainly appreciated.

    I do want to help you but I am not a coder by any sense of the word. But since you have made it this far, perhaps - no guarantee, that the lead developer may have some advice/advise us or insight to help further this project.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • aecnu

    Greetings kathy_darling,

    Thank you for letting us know and the flag for lead developer input is indeed still in effect so the possibility of getting things hammered out with gravity forms is still possible though it clearly falls into the realm of custom coding.

    It was nice for you to have mentioned the other persons plugin which is fine, but you did not give the link to it and looking it up in the repository I cannot find it.

    Please advise.

    Cheers, Joe

  • victorsxbr

    Hope this helps someone in need, I got this working using only GF to register the user.

    In my form I have radio inout in which the user chooses the Membership they want... I only have 2 memberships levels and the basic level is set by default.
    Then after registration I'm upgrading/setting the membership level using GF's gform_after_submission hook and the $wpdb->update, if they select the premium membership.
    here is that piece of code:
    add_action( 'gform_after_submission_3', 'post_to_third_party', 10, 2 );
    function post_to_third_party( $entry, $form ) {
    $membership_id_setter = rgar( $entry, '14' );
    $user = get_user_by( 'email', rgar( $entry, '3' ) );
    $new_user_id = $user->ID;
    if($membership_id_setter == 2) {
    $membership_id_setter2 = "premium - " . $new_user_id;
    global $wpdb;
    $wpdb->update( 'wp_m_membership_relationships', array("sub_id" => "$membership_id_setter"), array("user_id" => $new_user_id), array("%s"), array("%d") );
    $wpdb->update( 'wp_m_membership_relationships', array("level_id" => "$membership_id_setter"), array("user_id" => $new_user_id), array("%s"), array("%d") );