Search code examples
drupaldrupal-modulesdrupal-8user-registration

How to add a registration form with custom fields on the front page ( drupal 8 )


I'm pretty new to Drupal, but now i'm building a Drupal 8 site. My problem is that I need to have a registration form on the front page of my site. Currently I use the 'Form Block' module, but this only shows my 'email' and 'password' fields for registration. I have 2 other fields 'firstname' and 'lastname' that are required for a registration, but they won't show on the registration block on my front page.

If I go to the /user/register page, those fields are shown. So they are enabled and visible. Maybe worth mentioning I'm also using the 'Multiple registration' module, because I needed different registration pages for different roles.

When going the specific registration page for the role 'jobseeker' and printing the registration block (from 'Form block' module), it does show the fields 'firstname' and 'lastname', just not on my front page.

I have ensured that the fields 'firstname' and 'lastname' are intended for both jobseekers and general users

Can anyone help me out?


Solution

  • To add new field in registration form in Drupal 8 follow below steps: 1. Go to admin/config/people/accounts/fields 2. Add the desire field as per your requirement

    Now, There are multiple ways to display registration form on front page

    1. Set the registration page url as front basic site setting atadmin/config/system/site-information