I define my own twig layout for registering a new user, and everything turned out the way I want, except for the plainPassword field from FOSUserBundle.
<p class="left"> {{ form_widget(form.plainPassword) }} </p> <div class="clearfix"></div>
The above code displays both the password and the verification unit. I would like to break this down into 4 elements form.plainPassword.label, form.plainPassword.field, form.plainPassword2.label and form.plainPassword2.field. I cannot figure out what to put in the form_label() and form_widget() calls.
<p class="left"> {{ form_label( ??? ) }} {{ form_widget( ??? ) }} </p> <p class="left"> {{ form_label( ??? ) }} {{ form_widget( ??? ) }} </p> <div class="clearfix"></div>
I guess this can be done.
source share