30%off
Cyber Monday Sale

How to Create Custom User Registration Forms in WordPress

Published in Online Marketing.

Registering a user is the process in which a visitor creates an account on your website. The reasons why you may be interested in registering a user are diverse, including, for example, to save the data of your recurring customers, to join as a member of a forum, to join an affiliation or membership program, or to register as a collaborator or author of your website, among others.

By default, WordPress allows you to easily create user registration by indicating in Settings » General that anyone can register with a default profile for new users.

Membership settings in WordPress
Membership settings in WordPress.

Thus, by providing the registration URL, https://my-website/wp-login.php?action=register will display the following page for a user to register.

User registration on a WordPress site
New user registration on a WordPress site.

The problem with the default WordPress user registration is that, on the one hand, it does not allow you to add additional information about the user and, on the other, that the appearance of the page probably has little to do with your site’s look and feel.

The easiest way to solve both problems is to create a custom registration form in your WordPress that includes all the information you need and, in addition, is fully integrated with the style of the theme you use. Here are the steps to follow to create this type of forms with the Nelio Forms plugin. You will see how easy it is!

The Nelio Forms Plugin

Nelio Forms is a plugin for creating forms that integrates into the WordPress block editor with all the advantages that this entails. You can download the free version directly from the WordPress Plugin Directory and create all the simple forms you want. Or, if you want to unlock all its potential, you can get the Premium version for €49 and benefit from features like spam protection and data logging.

Create Your First Registration Form

Once installed from your Dashboard, creating a form is as easy as creating any post or page. In the sidebar menu, click on the “Add New” option from the Nelio Forms menu.

Add a new contact form with Nelio Forms
Add a new contact form with Nelio Forms.

You will be taken to the block editor where you will create your registration form. Here you must define the form itself:

Editing a form with Nelio Forms
Editing a form with Nelio Forms.

As you can see in the image above, you have a set of blocks that you can include as fields in the form by simply clicking and dragging, like any other block. You can indicate whether or not the fields are required, if you want the field label to be displayed, and add a placeholder if applicable. Also, you can add columns and text.

Create the Form’s User Registration Action

You currently have the following form submission actions:

  • Entry recording,
  • Email notification,
  • User registration, and
  • Content creation.
Form submission actions in Nelio Forms
Form submission actions in Nelio Forms.

If you enable the Entry recording option, the information filled in the form will be saved in your WordPress database. Email notification will send an email with the submitted form fields to the provided email address(es). And the fourth option, Content creation, is used to create a post, page or custom content type with the information filled in the form.

In order to register a user in your database, you must enable the User registration option in the Nelio Forms plugin. A modal window will open with the default values that will be saved from the form in your database.

Edit User Record Modal Window
User registration editing modal window.

Review each of the fields and modify the value of each of them as you see fit. To do this, just click on the label icon to the right of the field and you will be able to select any of the form fields provided in a submission.

Changing the content of one of the fields
Changing the content of one of the form fields.

For instance, I can select the user’s email address and use it as the “username” of the user that’ll be created when the form is submitted.

In the advanced settings options you can indicate if you want the user to log in once the registration is completed. You can also specify whether you want a random password to be generated or, as in this example, to use the password the user entered when filling in the form as the registration password.

Indicating the value of the registry password field
Specifying the value of the registration password field.

With Nelio Forms, you can also specify in the user registration form the value of the URL of the website and, through a drop-down, select the user role with which to register.

Finally, you can add in the form the additional meta-fields that you want to be saved from the user in the database of your website to complete the registration. This can be very useful to save additional information such as the telephone number, address, age, or any other information about your user.

Adding meta-fields in a user record in your database
Adding meta-fields in a user registration in your database.

As you can see, you have a wide variety of data options to register users in your database.

Insert Your Form Where You Want it to be Displayed

Once you have created your form, all that remains is to insert it on the page (or pages) where you want it to be displayed. The great advantage of Nelio Forms it its full integration with the WordPress editor. That is, you’ll be able to insert the form as a regular block as well as edit it inline.

Adding a form block to a page
Adding a Form block inside a Media & Text block within a Cover block.

Then you then have the option to create the form directly here. In this case, you can follow the steps explained above, or select the previously created form.

Options for inserting a Nelio Forms form
Options for inserting a Nelio Forms form.

Once the form is selected, you already have it inserted in your page like any other block.

Added form on a page
Added form on a page.

As I was saying, you can modify the form directly in the page where it’s used. If you do so, you will see that the button to update the page is slightly different and shows a white dot to the left of “Update.” When you update the page, you will need to confirm if you want to save the changes made to both the page and the form:

Save page and form modifications
Save page and form changes.

As you can see, it is much more convenient to make changes to the appearance directly on the page where you insert the form than if you had inserted it using, for example, a shortcode.

Check the Registered Users in Your WordPress

Once the registration form is already added to your page, you can check that the information added by your users is registered in the wp_user and wp_usermeta tables in your database and view the details in the users tab of your WordPress.

Registered user with Nelio Formss
Viewing a registered user with Nelio Forms.

For this example, I have used the Pods plugin to add the display of the meta fields added in the form to the users tab.

Conclusion

We have seen that, to create a custom user registration form with Nelio Forms, you don’t need to know how to code—it’s as easy as creating a post or page on your website! You can add the fields you want in the form and adding it to any page is as easy as adding any other block, being fully integrated with the styles of your website.

Featured image by Dai KE on Unsplash.

Leave a Reply

Your email address will not be published. Required fields are marked: •

I have read and agree to the Nelio Software Privacy Policy

Your personal data will be located on SiteGround and will be treated by Nelio Software with the sole purpose of publishing this comment here. The legitimation is carried out through your express consent. Contact us to access, rectify, limit, or delete your data.