Build a B2B registration form using Forminator, WPForms, Gravity Forms, etc.

B2BKing comes with its own extended registration functionality that allows you to create and combine 10+ types of custom fields, including text, phone, email, file upload, dropdown fields, etc.

However, in some cases you may want the more advanced functionality that comes with a dedicated forms plugin. In this article, let's look at how you can create registration forms that register B2B users, using 3rd party forms plugins.

User Meta Data #

To register a B2B user, from a technical standpoint, what needs to happen is to set 2 user meta keys for the user:

  • b2bking_b2buser , must have the key value: yes
  • b2bking_customergroup , must have the key value: the (post) ID of the B2BKing group (e.g. 1234)

Here you can learn more about how these keys work.

(Optionally), if you want to set that a user requires manual account approval, you also need to set the key:

  • b2bking_account_approved , must have the value no

Therefore any forms plugin can register B2B users, as long as it can set such user meta keys.

Building a form with Forminator #

A great option that we recommend is the Forminator plugin, which provides a powerful forms solution with an excellent free version:

Forminator Plugin

Forminator allows many different types of fields, conditional relationships, as well as pagination that allows you to split a form into multiple pages.

To create a form, go to Forminator -> Forms -> Create and find the preset "Registration" template, then click on "Use Template":

Using Preset Registration Template

Then set up whichever registration fields you'd like to have. For example we have set up a simple form with 2 fields, for company name, and company phone:

Setting Up Form Fields

Now let's set that this field registers B2B users, and that these users require B2BKing account approval before they can use the account.

To do this, we go to the "User Registration" panel of the form, and set up the meta keys and values there:

Setting Up User Meta Keys

In the above screenshot, 308 is the group ID, which we can find by editing the group in B2BKing -> Groups -> Business Groups, and checking the number in the URL (this number is unique on each site):

B2BKing Group ID

In the same panel, you should usually also set the user role to "Customer":

Set Customer Role

That's it! All you have to do now is to copy and paste the form shortcode to a new page. Forminator will give you the shortcode when you first save the form.

This form will register B2B users that require approval.

There are many other options in Forminator:

  • you can set up multiple pages
  • you can set up a dropdown with a "user type" field to register both B2B and B2C users
  • you can set up conditional fields that only show depending on which user type is selected, etc.

The important part for B2BKing is to set the necessary user meta keys, so that the users are added to the correct group and set as B2B.

Build a form with WP Forms #

Similar principles apply to setting up a user registration form with the WPForms plugin.

Importantly, you would need to set up the B2BKing user meta keys. At the time of this article, the ability to set user metadata is only found in the WPForms User Registration Add-on (part of their paid plugin).

To learn more about setting up a user registration form, and setting user meta fields in WP Forms: https://wpforms.com/docs/how-to-set-up-custom-user-meta-fields/

Build a form with Gravity Forms #

To set up a form with Gravity Forms, similarly you must connect the respective user meta keys.

This is currently part of their paid User Registration Add-on. For more information on this:

Create a Feed for Gravity Forms User Registration Add-on

Powered by BetterDocs