src/Form/BasketsType.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use App\Entity\Baskets;
  4. use Symfony\Component\Form\Forms;
  5. use Symfony\Component\Form\AbstractType;
  6. use Symfony\Component\Form\FormBuilderInterface;
  7. use Symfony\Component\OptionsResolver\OptionsResolver;
  8. use Gregwar\CaptchaBundle\Type\CaptchaType;
  9. use Symfony\Component\Form\Extension\Core\Type\SubmitType;
  10. use Symfony\Component\Form\Extension\Core\Type\FormType;
  11. class BasketsType extends AbstractType
  12. {
  13.     public function buildForm(FormBuilderInterface $builder, array $options): void
  14.     {
  15.         $builder
  16.     ->add('captcha'CaptchaType::class,['row_attr' => ["autocomplete"=>"off",'width' => 200,'height' => 50,'length' => 6]])
  17.         ->add('Envoyer'SubmitType::class)
  18.         ;
  19.     }
  20.     public function configureOptions(OptionsResolver $resolver): void
  21.     {
  22.         $resolver->setDefaults([
  23.             'data_class' => Baskets::class,
  24.         ]);
  25.     }
  26. }