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.

User gets added w/o an access level assigned w/ WPMU membership plugin

  1. I am using a gravity registration add on in conjunction with the WPMU Membership plugin. Everything seems to work except for the fact that when the user gets added it is not put in an access group. This is the way I am trying to get it to work: 2 access levels - Stranger and Registered. As soon as a user registers they are added at the "Membership Level" of Registered. The way it is working for me now is that the user gets added with no Membership level. You have to manually assign it. How do I change it so that when a user registers they are put in at the membership level of Registered? Is it a configuration item with the membership plugin? Does anyone have any prior experience getting these two items working in conjunction with one another? Just wondering if this is even possible to do with this combination? Or do I have to add PHP code somewhere in the gravity form?

    Posted 9 years ago on Thursday September 6, 2012 | Permalink
  2. That appears to be a premium plugin, which we do not have access to, so it will be difficult to help you troubleshoot this problem. Do you know where the membership levels are stored by the WMPU Dev membership plugin? If we know that, we should be able to recreate that functionality with Gravity Forms.

    Or, if you can contact the WPMU support, they should be able to tell you what function to call to update the level when a user registers with Gravity Forms.

    Posted 9 years ago on Friday September 7, 2012 | Permalink
  3. +1 on this! the dev's at WPMU wrote a little script for this, but it doesn't really integrate in the best way. This simply redirects users to member signup page after registration. The needed/ideal solution would add a user's subscription level based on a hidden or conditional field, And/Or integrate the Membership plugin check process into the gravity form. Any Ideas?

    1. Create a Gravity From and set it up for User Registration add-on (you must have version 1.4+).
    2. In the Form Settings set the "Confirmation" to redirect to the appropriate membership registration page.
    3. Embed the GF User Registration form in any page that is NOT a page setup in your Membership Options.
    4. As noted above add the following to your theme's functions.php:
      add_action( 'gform_user_registered', 'pi_gravity_registration_autologin', 10, 4 );
       * Auto login after registration.
      function pi_gravity_registration_autologin( $user_id, $user_config, $entry, $password ) {
      	$user = get_userdata( $user_id );
      	$user_login = $user->user_login;
      	$user_password = $password;
          wp_signon( array(
      		'user_login' => $user_login,
      		'user_password' =>  $user_password,
      		'remember' => false
          ) );

    What's happening here?
    As noted, we're auto-logging in the user once they register with gravity forms. Then redirecting them to the membership page.

    Since membership will see them as already being logged in they'll just be asked to select and process their subscription.

    In my tests this method works and should provide what folks are looking for here. Please let us know how it works for you.

    Other notes: Make sure you're username field is set to something that won't allow for spaces (this can cause problems) and that you're using the latest versions of Gravity Forms and the User Registration add-on.

    Posted 9 years ago on Thursday October 18, 2012 | Permalink
  4. Is there a reason that the code in step 4 needs to be in a theme's functions.php as opposed to, say, in a plugin file? Trying to make this work in a plugin I'm writing, but not having any luck.

    Posted 9 years ago on Wednesday November 14, 2012 | Permalink
  5. Now I got it... problem was I had WP_DEBUG turned on and form_display.php was generating a Notice from line 927, "Undefined index: query". That meant that wp_signon ran into "Cannot modify header information." Turned off debug and it worked very nicely.

    Posted 9 years ago on Wednesday November 14, 2012 | Permalink
  6. +1000 on this. It's all over the web people looking for this solution and WPMUDEV's solution that's posted in the forums really doesn't work.

    We've written a plugin that weaves the two together but have run into one snaffu in the GF shortcode that seems to be prohibiting the form from moving to the next step within the multipage registration.

    The form can be seen on: for reference

    We've gotten them woven together, although it's still having issues with setting up the do_shortcode() in the payment-form.php file

    Here's the code from that part of the plugin if you see any errors that might be causing

    $attributes = apply_filters('membership_subscription_gravity_form', array() );
        'title' => true,
        'description' => true,
        'id' => get_option('membership_gravityforms_options', 0  ),
        'name' => '',
        'field_values' => "",
        'ajax' => false,
        'tabindex' => 1,
        'action' => 'form'
    ), $attributes));
    echo do_shortcode("[gravityform id='{$id}']");

    Do you see anything in the code that is amiss? Or, do you know how I can tell the form to progress to the second part of the form? Currently it displays after the registration link is pressed but the form does not progress to the next stage.

    We've been trying to get this working for a while now if you have any suggestions of what to try next or see any code missing.

    btw, Jonos, we're happy to share the plugin with the public once it actually all works. I know a lot of people are trying to get these two to play nicely together.

    Anyone have a suggestion to get this to work?

    Posted 9 years ago on Tuesday November 20, 2012 | Permalink
  7. When you say "having problems" what actually happens, instead of displaying the form?

    Instead of using do_shortcode, you can embed the form directly with PHP if you like. When you use the function call, be sure to enqueue the required scripts and CSS. It's all documented here:
    (read all the way to the bottom for information on gravity_form_enqueue_scripts)

    Posted 9 years ago on Wednesday November 21, 2012 | Permalink
  8. Hey Chris,

    The problem that we're having is that our membership subscription button finally links to the GF form, but it does not progress and/or appears broken.

    Broken bc it does not move through the multipage sequence and if the the pages are removed so it's all just one form, the form does not submit after data entry.

    Does that give any breadcrumbs to the issue at hand?

    Posted 9 years ago on Wednesday November 21, 2012 | Permalink
  9. Can you post the URL of the page where the button does not work as expected?

    Posted 9 years ago on Wednesday November 21, 2012 | Permalink
  10. sure thing.

    Give this one a try:

    On the front end it's integrated with wpmudev's membership plugin but the form itself does not quite function yet. Oh, one more thing we realized. If you're logged in the gravity form displays (although doesn't submit the data after entering it). If you're not logged in, it seems to display the default registration form through the membership plugin.

    If you'd like me to send you this plugin for testing purposes, I'm happy to oblige. Let me know, Chris and thanks again!

    Just checked the list of members and it registered you! Didn't add the level of membership but it seems that the form did submit. What did you do? Could this be a cache issue on our end by chance?

    Posted 9 years ago on Wednesday November 21, 2012 | Permalink
  11. I realized that the logged in/logged out was a matter of the Membership plugin showing two different forms and my needing to replace them both.

    So now it is strictly that the Gravity form will neither advance in the case of a multi-page form nor submit in the case of a single page form. I've moved the test URL to

    Posted 9 years ago on Wednesday November 21, 2012 | Permalink