<?php
namespace App\Controller;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
class ContactController extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('fullname', TextType::class, ['label' => 'Nom', 'attr' => ['class' => 'form-control form-control-sm', 'placeholder' => 'votre nom et prénom']])
->add('email', EmailType::class, ['label' => '@Email', 'attr' => ['class' => 'form-control form-control-sm', 'placeholder' => 'votre adresse email']])
->add('service', ChoiceType::class, [
'label' => 'Service concerné', 'attr' => ['class' => 'form-control form-control-sm'], 'placeholder' => '-- choisir le service --',
'choices' => ['commercial' => 'bagape@ctobi.com', 'administration' => 'ctobi_fr@ctobi.com']
])
->add('action', ChoiceType::class, [
'label' => 'Suite attendue', 'attr' => ['class' => 'form-control form-control-sm'], 'placeholder' => '-- quelle suite --',
'choices' => ['rappeler' => 'rappeler', 'devis' => 'devis']
])
->add('message', TextareaType::class, ['label' => 'Texte', 'attr' => ['class' => 'form-control form-control-sm', 'placeholder' => 'entrez message']]);
}
}