WordPress Registration Form for B2B Accounts

  • Home
  • WordPress Registration Form for B2B Accounts
WordPress Registration Form for B2B Accounts

A WordPress registration form for B2B accounts is usually built on a ready-made user forms plugin, with custom code added only where the business logic starts: extra fields for company data, their validation and what happens to the account after registration. Fully custom work is needed when registration requires approval by a sales rep, pulls data from external registers or feeds an ERP. Below you will find an example implementation and a list of decisions worth making before the first line of code.

Why isn’t the standard WordPress registration enough for businesses?

The default WordPress form collects a username and an email address, and the customer lands in a panel that looks like the site’s back end. For a wholesale store, a partner platform or a customer zone, that is not enough and it feels out of place.

A business usually needs three things: forms embedded in regular pages of the site, extra fields for company data and control over what happens after registration and login. On top of that come permissions, which we cover in our article on how WordPress user roles work.

What does a ready-made user forms plugin give you?

A ready-made plugin takes care of building the forms, pages and notifications, and leaves hooks where a developer plugs in custom logic. That is the most sensible split of work for business accounts.

This is how the Custom User Forms PRO plugin works. According to its description and documentation, it:

  • provides shortcodes for the login, registration, lost password and password reset forms and the user profile page, so you can place the forms on any page of the site,
  • lets you override form templates from your theme, so you can adjust the look and add fields in HTML,
  • has hooks for validating and sanitizing custom fields, adding error messages and saving extra user data,
  • lets you set redirects after login and after registration, automatic login after registration and who gets notified about a new account: the administrator, the user or both,
  • protects forms with reCAPTCHA v3.

Hooks are attachment points in the plugin’s code where you add short functions in your own theme or a small plugin. You don’t need to modify the plugin itself, and its updates won’t overwrite your changes.

Example: business account registration for a wholesaler

Take an office supplies wholesaler running on WordPress that wants companies to create accounts with the company name, NIP (Polish tax ID) and billing address. Building such a WordPress registration form on a ready-made plugin looks like this:

  1. Pages. You create login, registration, lost password and profile pages and insert the matching shortcodes.
  2. Template. You copy the registration form template to your theme and add fields: company name, NIP, street, postal code, city and contact person’s phone number.
  3. Validation. In the validation hook you check that the fields are filled in and that the NIP has a valid format and checksum. Errors go back to the customer as clear messages through the messages hook.
  4. Sanitizing and saving. You clean the data in the sanitizing hook and save it to the user account through the user data hook.
  5. After registration. You set a redirect to a page explaining the next steps, plus a new account notification for both the administrator and the customer.
  6. Profile. You add the same fields to the profile page template, so customers can update company details themselves instead of emailing you when their address changes.
  7. Testing. You create a few accounts with incorrect data and check that the form stops them with a clear message.

The custom code in this scenario is just a few functions attached to the plugin’s hooks. That is less work than building forms from scratch and less risk than reworking someone else’s plugin.

When does a WordPress registration form need custom code from the start?

Fully custom work makes sense when registration is part of the sales process, not just account creation. In that case the form is the smallest part of the project.

  • Account approval. The account has to wait for a sales rep to verify it, get a price group and a credit limit, and the customer should only be notified after approval.
  • Data from registers. The form should fetch the company name and address from an external service based on the NIP number.
  • ERP or CRM sync. A new customer should be sent to the sales system, and profile changes should flow back to the store.
  • Multiple users per company. Several people from one company with different permissions, for example one places orders and another approves them.

We run such projects as extensions of WordPress websites and services. These are typical requirements of wholesale platforms, which we compare in our article on choosing an off-the-shelf or custom B2B system.

What to keep in mind with company data and form protection?

Collect only the data you actually use and protect the form from bots. Every extra field means more work for the customer and more data to secure.

The data minimisation principle comes from Article 5 of the GDPR: personal data must be adequate and limited to what is necessary for the purpose of processing. The contact person’s name or phone number is personal data even when the account is created by a company.

Registration forms also attract bots creating fake accounts. According to Google’s reCAPTCHA documentation, reCAPTCHA v3 scores every request without interrupting the user, and we explain how to choose protection without annoying customers in our article on protecting forms from spam.

Frequently asked questions

Can I add a NIP field without a developer?

Someone who knows HTML can add the field itself to the template, but validating and saving it requires a little code in the hooks. It is a small job worth ordering together with testing the form.

Will form changes survive a plugin update?

Yes, if they live in your theme or a separate plugin. Templates are overridden in the theme folder and logic is added through hooks, so the plugin’s own files stay untouched.

Can customers update company details themselves?

Yes, through the user profile page. The extra fields need to be displayed and saved there the same way as in the registration form.

If your WordPress registration form needs to collect company data, redirect customers after login and notify the right people, start with a ready-made plugin and add only the business logic. You will find the list of shortcodes, hooks and settings on the page of the Custom User Forms PRO plugin.

Book a free consultation

Provide your phone number or schedule a meeting