src/Controller/ContactController.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\FormBuilderInterface;
  5. use Symfony\Component\Form\Extension\Core\Type\TextType;
  6. use Symfony\Component\Form\Extension\Core\Type\EmailType;
  7. use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
  8. use Symfony\Component\Form\Extension\Core\Type\TextareaType;
  9. class ContactController extends AbstractType
  10. {
  11.     public function buildForm(FormBuilderInterface $builder, array $options): void
  12.     {
  13.         $builder
  14.             ->add('fullname'TextType::class, ['label' => 'Nom''attr' => ['class' => 'form-control form-control-sm''placeholder' => 'votre nom et prĂ©nom']])
  15.             ->add('email'EmailType::class, ['label' => '@Email''attr' => ['class' => 'form-control form-control-sm''placeholder' => 'votre adresse email']])
  16.             ->add('service'ChoiceType::class, [
  17.                 'label' => 'Service concernĂ©''attr' => ['class' => 'form-control form-control-sm'], 'placeholder' => '-- choisir le service --',
  18.                 'choices' => ['commercial' => 'bagape@ctobi.com''administration' => 'ctobi_fr@ctobi.com']
  19.             ])
  20.             ->add('action'ChoiceType::class, [
  21.                 'label' => 'Suite attendue''attr' => ['class' => 'form-control form-control-sm'], 'placeholder' => '-- quelle suite --',
  22.                 'choices' => ['rappeler' => 'rappeler''devis' => 'devis']
  23.             ])
  24.             ->add('message'TextareaType::class, ['label' => 'Texte''attr' => ['class' => 'form-control form-control-sm''placeholder' => 'entrez message']]);
  25.     }
  26. }