Reputation: 65
I have just configured and prepared the FOSUserBundle on my Symfony project. But when I try to show the register view looks like that:
The register form (by default) should look like:
All what I configured is on Documentation, I don't know what happend.
This is the RegistrationFormType.html.twig from FOSUserBundle:
class RegistrationFormType extends AbstractType
{
...
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('email', LegacyFormHelper::getType('Symfony\Component\Form\Extension\Core\Type\EmailType'), array('label' => 'form.email', 'translation_domain' => 'FOSUserBundle'))
->add('username', null, array('label' => 'form.username', 'translation_domain' => 'FOSUserBundle'))
->add('plainPassword', LegacyFormHelper::getType('Symfony\Component\Form\Extension\Core\Type\RepeatedType'), array(
'type' => LegacyFormHelper::getType('Symfony\Component\Form\Extension\Core\Type\PasswordType'),
'options' => array('translation_domain' => 'FOSUserBundle'),
'first_options' => array('label' => 'form.password'),
'second_options' => array('label' => 'form.password_confirmation'),
'invalid_message' => 'fos_user.password.mismatch',
))
;
}
...
}
Upvotes: 1
Views: 49
Reputation: 2302
First of all you should run translation component
in config.yml
uncomment line
translator: { fallbacks: ["en"] }
and (like was said in comment) read about overriding views
Upvotes: 1