src/Form/UserLiseuseType.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use App\Entity\User;
  4. use Symfony\Component\Form\AbstractType;
  5. use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
  6. use Symfony\Component\Form\Extension\Core\Type\DateType;
  7. use Symfony\Component\Form\FormBuilderInterface;
  8. use Symfony\Component\OptionsResolver\OptionsResolver;
  9. use Captcha\Bundle\CaptchaBundle\Form\Type\CaptchaType;
  10. use Captcha\Bundle\CaptchaBundle\Validator\Constraints\ValidCaptcha;
  11. class UserLiseuseType extends AbstractType
  12. {
  13.     public function buildForm(FormBuilderInterface $builder, array $options)
  14.     {
  15.         $builder
  16.             ->add('firstname')
  17.             ->add('lastname')
  18.             ->add('email')
  19. //            ->add('captchaCode', CaptchaType::class, array(
  20. //                'captchaConfig' => 'ExampleCaptcha',
  21. //                'label' => 'Retype the characters from the picture',
  22. //                'constraints' => [ new ValidCaptcha(['message' => 'Captcha invalide.'])]
  23. //            ))
  24.         ;
  25.         ;
  26.     }
  27.     public function configureOptions(OptionsResolver $resolver)
  28.     {
  29.         $resolver->setDefaults(array(
  30.             'allow_extra_fields' => true
  31.         ));
  32.     }
  33. }