In a previous post, we learned how to automatically assign specific roles to users depending on the registration form they signed up from.

Today, I will be showing us how to allow user role selection from a dropdown by users at account registration / sign up. Put simply as, allowing users to pick their roles on sign up.

Without further ado, follow the steps below to learn how to accomplish this.

Navigate to ProfilePress >> Registration and click the title of your active registration form to open up the edit screen.

In Registration Design code area, add the below shortcode to where you want the user role select-dropdown to appear.

[reg-select-role]

You should now see it displayed in the registration form.

Note: by default, all user roles save for ‘administrator’ will be displayed n the dropdown. To restrict the selection to specific roles, add the roles as a comma separated list to the options shortcode attribute.

For example, say your website is a Job listing and you want registering users to indicate what account type they want by selecting either employer or candidate as their role. The following is how you will construct the shortcode.

[reg-select-role options="employer, candidate"]

Finally, save the changes and you should see the user role dropdown displayed in your form.

If you have a pre-sale enquiry or any question to ask, use the comments below or shoot us a mail via support[at]profilepress.net.

Tags: roles, user role