<?php
namespace App\Form;
use App\Entity\User;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use VictorPrdh\RecaptchaBundle\Form\ReCaptchaType;
class UserType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('username', TextType::class, array('required' => true, 'attr' => array('class' => 'form-control')))
->add('email', EmailType::class, array('invalid_message' => 'VĂ©rifier votre email SVP', 'required' => true, 'attr' => array('required' => 'required', 'class' => 'form-control', 'placeholder'=>'Email')))
// ->add("recaptcha", ReCaptchaType::class)
/*->add('email')
->add('roles')
->add('password')
->add('username')
->add('etat')
->add('createdAt')
->add('updatedAt')*/
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => User::class,
]);
}
}