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, and more.

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 third-party form plugins.

User Meta Data #

To register a B2B user, from a technical standpoint, you need to set two 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 require manual account approval for a user, you also need to set the following 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 supports many different types of fields, conditional relationships, and 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 "Use Template":

Using the Preset Registration Template

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

Setting Up Form Fields

Now let's configure this form so that it registers B2B users and these users require B2BKing account approval before they can use their account.

To do this, 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 screenshot above, 308 is the group ID, which you 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 also typically set the user role to "Customer":

Set Customer Role

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

This form will register B2B users that require approval.

There are many other options available 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 appear depending on which user type is selected.

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

Building a Form with WPForms #

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

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

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

Building a Form with Gravity Forms #

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

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

Create a Feed for Gravity Forms User Registration Add-on

Powered by BetterDocs