<?php
namespace App\Form;
use App\Entity\EvenementFormulaire;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
class formulaireEvenementType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('nom',null,['label' => 'Nom'])
->add('prenom',null,['label' => 'Prénom'])
->add('email',null,['label' => 'Email'])
->add('fonction', ChoiceType::class, [
'label' => 'Fonction',
'choices' => [
'Physiothérapeute ' => 'Physiothérapeute',
'Etudiant' => 'Etudiant',
'Médecin' => 'Médecin',
'Autre' => 'Autre',
],
])
->add('type', ChoiceType::class, [
'label' => 'Type',
'choices' => [
'Adhérent ' => 'Adhérent',
'Non adhérent' => 'Non adhérent'
],
])
->add('phone',null,['label' => 'Numéro de téléphone']);
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => EvenementFormulaire::class,
]);
}
}