src/Form/RentalSubscribeType.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\FormBuilderInterface;
  5. use Symfony\Component\OptionsResolver\OptionsResolver;
  6. use Beelab\Recaptcha2Bundle\Form\Type\RecaptchaType;
  7. use Beelab\Recaptcha2Bundle\Validator\Constraints\Recaptcha2;
  8. class RentalSubscribeType extends AbstractType
  9. {
  10.     public function buildForm(FormBuilderInterface $builder, array $options)
  11.     {
  12.         $builder
  13.             ->add('email')
  14.             ->add('g-recaptcha-response'RecaptchaType::class, [
  15.                 'constraints' => new Recaptcha2(),
  16.                 'mapped' => false,
  17.                 'error_bubbling' => false
  18.             ])
  19.         ;
  20.     }
  21.     public function configureOptions(OptionsResolver $resolver)
  22.     {
  23.         $resolver->setDefaults([
  24.             // Configure your form options here
  25.         ]);
  26.     }
  27. }