How to create custom WordPress user registration forms
There are many ways to use WordPress to register users. But the default user onboarding experience might not be ideal for everyone. Today we are going to look into how you can enable custom WordPress user registration. For that, we’ll use the Ultimate Member plugin and its WordPress user registration features. This allows us to create custom user registration forms in WordPress through a drag and drop interface.
If you have a WordPress site with registered users, creating a custom form is a great way to stand out. In this way you’ll be able to merge a form into your own theme, reinforcing your branding, instead of using the default one.
Creating forms for custom user registration in WordPress also allows you to register different user segments. This is especially useful if you have different roles on your site, or if you want to grant different access levels to your users.
We are also going to look into a few examples of how to gather information from your users registered via these custom forms. For that, we’ll use Users Insights, and we’ll see how you can gather custom fields and other user data.
The main topics for today are:
- Plugins for user registration
- Ultimate Member custom user registration for WordPress
- Segmented registration
- Implementing the registration form
- Making the user data private
- Filtering your data with Users Insights
So, let’s get started!
Plugins for user registration
There are many plugins that you can use to allow WordPress custom user registration. The Ultimate Member plugin is certainly one of the most complete solutions out there. It not only allows you to create custom WordPress registration forms, but also it turns your site into a membership platform. In this way you can also restrict content based on the user role, allow frontend registration, login and profile edits.
But there are other options there, so let’s see two other good plugins that you could use.
The User Registration plugin is the go-to option for lightweight custom WordPress registration forms. This plugin is more focused on the user registration workflow. But it also has a nice drag and drop form builder, and works well with most WordPress themes.
Another option is the Simple User Registration plugin. Similarly to the previous contender, this plugin allows you a lightweight option for custom WordPress user registration forms. It is loaded based on a shortcode so you can add it to any page you want to.
Now let’s go back to our focus here, the Ultimate Member plugin. Let’s see next how you can create your custom user registration forms for WordPress with it.
Ultimate Member custom user registration for WordPress
Before building our custom user registration forms, you need to install and activate the Ultimate Member plugin. The easiest way to install it is via the WordPress Dashboard > Plugins > Add New and enter “Ultimate Member” in the search.
You can create new forms from the Ultimate Member > Forms > Add new section. The forms builder is your home when it comes to creating ways for your users to interact with your site. In this section you can create custom registration, custom login and custom profile forms. These forms can be added to pages, later on, making it easy for you to provide a customized experience for your users.
Since our goal is creating a custom user registration in WordPress, we’ll use the Registration Form type. Then we must add the basic fields (such as username and password), but we can pick and choose other fields. For instance, you can add a main programming language field to a form that is aimed towards developers. For another form, you can switch up fields, such as the preferred designing tool for designers.
Now just add a few fields in your form. You can pick fields you’ve already created, predefined fields, or use custom fields you’ve created:
On the second group, “predefined fields”, you can see that some are greyed out. As you are adding fields to your form they can’t be added again.
Now let’s go back to the first group and create a new custom field of our own. Let’s call it Main Programming Language, and it’s going to be a dropdown.
Once you add it, it’s going to be available to all your forms in the third group we’ve seen earlier “Custom Fields”.
Save that form and we’re ready to create our registration page. But first, let’s dig deeper into creating different registration forms for better user segmentation.
As you may have noticed, you can create as many registration forms as you want. And this is a great tool not just to collect different fields depending on your user type. You can actually assign different roles to your users depending on the form they use.
It’s also possible to provide a custom WordPress user registration experience through forms with different designs. So, a different looking form for designers and developers, for employees and employers, for wholesale and retail customers.
The magic is in the “Apply custom settings to this form” field, enable that and you’ll see a whole new world of options for your form.
We won’t go trough each of the options as that would take a lot of time, but you can play around with them. They can be used to change the user roles, color scheme, sizes and even the actual template used for that page.
Once you have your forms created let’s finally add them to your pages.
Implementing the registration form
The last step of our custom user registration forms is adding the shortcodes to your WordPress pages. You can get the shortcode for each of these pages in the general forms overview:
Then paste that code into a page and save it. This should be its output:
Making the user data private
Ultimate Member, being a membership plugin, creates some public user pages. If you need your users’ data to be private, you would need to configure the Ultimate Member privacy settings.
The first thing that you might want to do is disable the Member Directories from the Ultimate Member > Settings > General > Users section.
Ultimate Member also creates a User profile page that shows the user data that each user has submitted. To limit access to this page, open it in edit mode and enable the “Restrict access to this content” option from the “UM Content Restriction” section. Then select the “Logged in users” option in the “Who can access this content” field. This will not allow the non-user visitors to access the page.
To hide this page from the other logged in users, go to Ultimate Member > User Roles. Then for each role that is not supposed to view other users’ profiles, disable the “Can view other member profiles” option.
Now the last step is sending your users to these pages. Make sure to add some text or instructions, so that users are going to fill in the correct form for their user type. In these forms, you can include custom fields or even use the roles in a way that it’s feasible to extract the information you want. Talking about retrieving information, let’s see how you can do that with your custom registration forms and Users Insights.
Filtering your data with Users Insights
Once you have the Ultimate Member module active in your Users Insights site you’ll see all your custom fields automatically. This is particularly useful if you want to filter all users based on that data. These fields are available as columns and as filter criteria.
In our example, you may want to check all Java developers who registered through that form. This can be done by filtering users by their Main Programming Language.
Since we can use custom roles, you can also check all the designers registered through our custom form. This can be done by simply using the Role filter:
As usual, you can save these filters as segments for later use, or export your users and their custom data for further processing.
Today we looked into how you can use the Ultimate Member plugin to create custom WordPress user registration forms. We also learned how to save custom fields as well as assign custom settings to our forms, such as new user roles or different form templates. Another aspect covered was the data processing that can be done with Users Insights. So by the end of the day, you should be able to not only create your custom user registration forms but also to extract custom user reports and any information you may need in that aspect.
We hope you enjoyed this tutorial, and see you again next time!