$form = $this->factory->create($this->config['register']['view']['form'], $user, [
//Set action to register route name and context
'action' => $this->generateUrl($this->config['route']['register']['name'], $this->config['route']['register']['context']),
+ //Set captcha
+ 'captcha' => true,
//Set civility class
'civility_class' => $this->config['class']['civility'],
//Set civility default
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver): void {
+ //Call parent configure options
+ parent::configureOptions($resolver);
+
//Set defaults
$resolver->setDefaults(['error_bubbling' => true, 'civility' => true, 'civility_class' => 'RapsysUserBundle:Civility', 'civility_default' => null, 'mail' => true, 'password' => true, 'password_repeated' => true, 'forename' => true, 'surname' => true, 'active' => false, 'enable' => false]);