<?php
namespace App\Form;
use App\Entity\User;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Captcha\Bundle\CaptchaBundle\Form\Type\CaptchaType;
use Captcha\Bundle\CaptchaBundle\Validator\Constraints\ValidCaptcha;
class UserLiseuseType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('firstname')
->add('lastname')
->add('email')
// ->add('captchaCode', CaptchaType::class, array(
// 'captchaConfig' => 'ExampleCaptcha',
// 'label' => 'Retype the characters from the picture',
// 'constraints' => [ new ValidCaptcha(['message' => 'Captcha invalide.'])]
// ))
;
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'allow_extra_fields' => true
));
}
}