X-Git-Url: https://git.rapsys.eu/userbundle/blobdiff_plain/778597e00e9b7786f7c94b45a18f20014e992b26..ee0b2896d4f625a791c940e34aa7e5e5e56cbebb:/Form/RegisterType.php diff --git a/Form/RegisterType.php b/Form/RegisterType.php index bfedcf7..f4327c0 100644 --- a/Form/RegisterType.php +++ b/Form/RegisterType.php @@ -21,6 +21,7 @@ class RegisterType extends AbstractType { * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { + //Create form $form = $builder; //Add extra mail field @@ -30,7 +31,7 @@ class RegisterType extends AbstractType { //Add extra civility field if (!empty($options['civility'])) { - $form->add('civility', EntityType::class, ['class' => $options['civility_class'], 'attr' => ['placeholder' => 'Your civility'], 'constraints' => [new NotBlank(['message' => 'Please provide your civility'])], 'choice_translation_domain' => true, 'data' => $options['civility_default']]); + $form->add('civility', EntityType::class, ['class' => $options['civility_class'], 'attr' => ['placeholder' => 'Your civility'], 'constraints' => [new NotBlank(['message' => 'Please provide your civility'])], 'choice_translation_domain' => true, 'empty_data' => $options['civility_default']]); } //Add extra pseudonym field