Answer the question
In order to leave comments, you need to log in
How to make a custom Drupal registration form?
Just started with Drupal. And the question is how to make your registration form. You can of course add fields to the standard form, but I need to have different registration forms for different types of users. Roughly speaking, physical the person must enter the full name, and legal. person name and TIN. I would like the user to choose his type on the registration form and get a set of fields for himself.
How to create a module for this? Can someone share an example?
Answer the question
In order to leave comments, you need to log in
Add all fields to the user profile and use the Conditional Fields module to hide the ones you don't need when choosing the registration type. You can also add another submit to the registration form in the custom module via hook_form_alter() and give them different roles depending on the selected type.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question