From 0f09ede543b60204768e54f05d4fff0f39e7e57c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 2 Apr 2024 05:45:01 +0200 Subject: [PATCH] Enable contact captcha --- Controller/DefaultController.php | 1 + Form/ContactType.php | 3 +++ 2 files changed, 4 insertions(+) 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]); } -- 2.41.1