In Drupal websites, the login and registration is already integrated by default. But in one of our sites, our requirement is to add some custom fields in the drupal registration form. E.g., Full name, address, state, postcode, etc.
To fulfill our requirement we will use profile module. Once, the profile module is installed and enabled you can add custom fields from administrative menu/user management/profile as shown in figure below :
Custom Fields
Firstly, you will have to choose the field type from the list like text field, multi text field, checkbox etc.
Secondly, give a category name to make a group of your custom fields.
E.g., If you are giving “category name”=Contact Information to the fields then those fields will become a group and show under Contact Information tab.
Finally, Give the title of the field and a machine-readable name. Check this option “Visible in user registration form” from the form. If this option is not checked then this field will not show in the user registration form. If you want to validate the field then check the option ” The user must enter a value “. Click Add field button to save the field.
In our example, we have added some custom fields like registration type, full name, firm, etc. as shown in the figure below.
Custom Drupal Registration form