0

I'm trying to theme the user registration form in Drupal 8.
I have defined a custom template for user registration form and printing the fields with the following code.

{{ form.field_profile_title }}
{{ form.field_profile_first_name }}
{{ form.account.mail }}

When I try to print confirm password field it's not printing the field.

{{ form.account.pass}}

What could be the issue?

0

You can always debug your twig template by printing the present variables, with help of of the Kint module (part of Devel) for example:

{{ kint(form.account.pass) }}

Or you can also print all of them:

{{ dump() }}

Further information on this page.

-1

I have achieved through {{ element.account.pass }} I have created a twig by using hook_theme_suggestions_alter(array &$suggestions, array $variables, $hook). it worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.