From: Raphaƫl Gertz Date: Tue, 2 Apr 2024 03:45:01 +0000 (+0200) Subject: Enable contact captcha X-Git-Tag: 0.5.0~12 X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/airbundle/commitdiff_plain/0f09ede543b60204768e54f05d4fff0f39e7e57c Enable contact captcha --- diff --git a/Controller/DefaultController.php b/Controller/DefaultController.php index 647baf8..1459096 100644 --- a/Controller/DefaultController.php +++ b/Controller/DefaultController.php @@ -105,6 +105,7 @@ class DefaultController extends AbstractController { //And give the proper parameters $form = $this->factory->create('Rapsys\AirBundle\Form\ContactType', $data, [ 'action' => $this->generateUrl('rapsysair_contact'), + 'captcha' => true, 'method' => 'POST' ]); diff --git a/Form/ContactType.php b/Form/ContactType.php index 93951e9..4142c99 100644 --- a/Form/ContactType.php +++ b/Form/ContactType.php @@ -46,6 +46,9 @@ class ContactType extends CaptchaType { * {@inheritdoc} */ public function configureOptions(OptionsResolver $resolver): void { + //Call parent configure options + parent::configureOptions($resolver); + //Set defaults $resolver->setDefaults(['error_bubbling' => true]); }