How to create several unique registration forms on the same website using the Multiple registration module

Last updated on
29 September 2022

Suppose we are creating a site that has two user roles - "Writer" and "Subscriber". The user can fill out the registration form and get one of those roles. At the same time, the writer registration form has an additional field for choosing a genre, which is absent on the subscriber registration form. Let's consider how to create these forms.

1. Visit /admin/people/roles page and click on the "Ad role" button to create the "Writer" role, see pic. 1-2

Pic. 1

Pic. 2

2. Click on the "Add own registration page" operation link of the "Writer" role, see pic. 3

Pic. 3

3. Enter the "/user/register/writer" path into the "Registration page path" field and click on the "Save configuration" button, see pic. 4
Additionally, it's possible to specify a redirect path (path where the user should be redirected to after submitting the registration form). Also, it's possible to hide registration form tab (indicates whether form will be accessible only by url).

Pic. 4

4. Now we need to make our created registration form available to anonymous users. To do this, click on the "Multiple Registration pages access settings" link, see pic. 5

Pic. 5

5. On the form that opens, select the "Writer" option and click on the "Save access settings" button, see pic. 6

Pic. 6

6. Let's add a genre selection field to the writer's registration form. Visit /admin/config/people/accounts/fields page and add the field of the "List (text)" type, see pic. 7-9

Pic. 7

Pic. 8

Pic. 9

7. To make the field available only on the writer registration form, check the "Users with Writer role" option from the "This field is needed for:" section, see pic. 10-11

Pic. 10

Pic. 11

8. To ensure that the writer registration form has the "Genre" field rebuild the cache, logout and visit /user/register/writer page, 
see pic. 12

Pic. 12

In the same way, let's create the subscriber registration form and get rid of the "Create new account" tab, see pic. 13-18

Pic. 13

Pic. 14

Pic. 15

Pic. 16

Pic. 17

Pic. 18

9. To make sure that the subscriber registration form has been created, rebuild the cache, logout and visit /user/register/subscriber page, see pic. 19

Pic. 19

And the last thing we have to do is to remove the "Create new account" tab.

10. Visit /admin/config/people/multiple_registration page and click on the "Common settings" link, see pic. 20

Pic. 20

11. Check the "Disable main registration page" option and click the "Save" button, see pic. 21

Pic. 21

12. After rebuilding of the caches, users can visit /user/register/subscriber page and register as subscribers or visit the /user/register/writer page and register as writers, see pic. 22-23

Pic. 22

Pic. 23

13. The last thing to note is that we can make it so that the tabs are not displayed, for example, as on the pic. 24

Pic. 24

In order to make this happen visit the /admin/config/people/multiple_registration page and click on the "Edit" link, see pic. 25

Pic. 25

14. Check the "Hide registration form tab" option and click on the "Save configuration" button, see pic. 26

Pic. 26

1. Video: Drupal Modules: The One Percent — Multiple Registration (tutorial).
2. Article: Create Individual Registration Forms using Multiple Registration in Drupal 8.

Help improve this page

Page status: No known problems

You can: