This documentation is for a version that has reached its End Of Life. Such versions are no longer supported and don't receive security updates. Consider updating to a newer version.
You can create a registration form for users to your website by creating a Twig template or editing the existing registration form in YAML file.
Follow the instructions below to create and customize templates for a registration form, and a registration confirmation page.
In your configuration, under allowed_field_definitions_identifiersconfiguration key, specify the fields that should be part of your registration form.
You can also define what kind of user you want to create under user_type_identifier, for example, frontend user.
To learn more about available users, see user types documentation.
In the templates/themes/<theme_name>/user/registration_confirmation.html.twig, create the template for confirmation form.
Example confirmation form:
1234567
{%extendsno_layoutisdefinedandno_layout==true?view_base_layout:page_layout%}{%blockcontent%}<h1>Your account has been created</h1><pclass="user-register-confirmation-message">
Thank you for registering an account. You can now <ahref="{{path('login')}}">login</a>.
</p>{%endblock%}
To add a link redirecting to the login form, in the page layout template, provide the following code: