• Skip to main content
  • Skip to footer

rc vane

  • About
  • Work
  • Moods
  • art
  • contact

Assign BuddyPress Member Type with Gravity Forms User Registration Add-On

March 29, 2017 by Rachel C Vane

I recently had a client with a small annual-fee based member site running on BuddyPress want to add 2 more member tiers, with different annual fees.

  1. Tier 1: Professionals, to show in public directory
  2. Tier 2: Affiliates, not to show in public directory
  3. Tier 3: Students, not to show in public directory

The site’s existing system:

  1. BuddyPress
  2. Gravity Forms User Registration Add-On
  3. Gravity Forms PayPal Add-On

To work within the existing system, I found the ability to assign different member types in BuddyPress was not difficult. You can add these on the fly pretty easily to your functions.php or your bp-custom.php files or you can add them using a plugin: here’s one by BuddyBoss and a free one by BuddyDev.

I choose the BuddyBoss plugin, for a few reasons:

  1. So my client’s assistant would be able to add new member types in the future and easily assign xProfile fields based on member type.
  2. Easy to show/hide from public directory.
  3. The option of having a tabbed directory for different member types in the future.
  4. The ability assign WP roles to member types.

The other plugin I’m using tie this together: BuddyPress Xprofile Member Type Field, by BuddyDev here.

The BIG Problem

Once I had all the member types set, if I was using the default BuddyPress registration form, this would have been cake, because each registrant could select his/her member type. So, I mistakenly I thought it would be easy to field map with an Xprofile field to automatically assign a member type to a new registrant. Wrong. After searching for a bit, I found out it is actually not possible to map a dropdown or radio button.

I really wanted to keep using the Gravity Forms User Registration, so the client could collect payments and BuddyPress, since I had customized some of the member areas.

There are lots of solutions to this with more advanced code and possibly using Gravity Form field auto-populating, however I found a solution that I could teach a tech-minded assistant without any code and without installing a full-blown membership plugin.

The Solution

The beginning steps:

  • Add the Member Types (via plugin or code in your function.php or your bp-custom.php)
  • Install the BuddyPress Xprofile Member Type Field
  • Go to “Users > Extended Profile”: Add a new field and for ‘Type” select “Single Member Type” and save.

After you have the beginning steps compete, edit your registration form. Here I have a required product field with 3 radio button options, one for each tier:

 

Next, add a “Single Line Text Field” for each member tier. Be sure to give it a simple label that you’ll recognize. Go to the advanced settings.

  1. First set the default value. This is a very important step. If this does not match the name of the tier, it will not work. I recommend each tier have a one word title, just to make life easier.
  2. Then select “Visibility > Hidden”.
  3. And finally, Check “Enable Conditional Logic” to “Show if All match: “Select your Product Tier field” > “Select the Tier this Field is for”. For example, my affiliate tier hidden field looks like this:

 

Once you have a hidden field set for each tier, save your form and head to your Gravity Form’s “User Registration” settings. You’ll need to set up a feed for each tier:

 

 

Open each feed and set up your settings per usual, except for one part. Under the “BuddyPress Profile” section, be sure to select the “Member Type” field you created in the beginning. Each feed should match member type, so here’s what my affiliate member feed looks like:

Before updating the settings of each individual tier feed, you have one more setting. Enable a condition for each feed to run only if the registrant selected the corresponding tier. Again, how this looks for my affiliate member set up:

 

Now each registrant should be assigned the proper member type. 🙂

Tweet
Share
Pin
Share

Filed Under: buddypress, gravity forms, techy

About Rachel C Vane

I help business owners with their websites.

Footer

Services + Work

  • Branding
  • Websites Services
  • WordPress Maintenance Packages
  • Portfolio
  • FAQ

Common Website Questions

  • What is domain registration and what is website hosting?
  • What is SEO (Search Engine Optimization)?
  • What is responsive web design? Does mobile-friendly matter?
  • How do you write a homepage?

Solopreneurship

  • Underestimating Everything & Giving up on “The End”
  • Leaving behind a constant state of rush.
  • You create the business you want.
  • Good things, Not-so-good things and Finding Happiness

RC Vane © Copyright 2022. All Rights Reserved. Website by RC Vane Privacy + terms

Made with ❤️ in sunny Tucson, AZ | We support equality + social justice warriors. 🏳️‍🌈 ✊🏻✊🏼✊🏽✊🏾✊🏿

Brand basics are fonts, colors, + professional and/or stock photos.

You can do these yourself, hire someone on Fivver, UpWork, or any other pro you know.

You can also hire us for the colors, fonts + stock photo selections! Contact us if you’re interested in learning more about this service.