Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.humitest.fr
/
htdocs
/
src
/
Form
/
/srv/data/web/vhosts/www.humitest.fr/htdocs/src/Form/ContactType.php
<?php namespace App\Form; use App\Entity\Contact; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\ChoiceList\ChoiceList; class ContactType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('prenom',TextType::class,[ 'label' => 'Nom', 'property_path' => 'firstname' ]) ->add('nom',TextType::class,[ 'label' => 'Prenom', 'property_path' => 'lastname' ]) ->add('email',TextType::class,[ 'label' => 'Email', ]) ->add('telephone',TextType::class,[ 'label' => 'Téléphone', 'property_path' => 'phone' ]) ->add('entreprise',TextType::class,[ 'label' => 'Entreprise', 'property_path' => 'fonction' ]) ->add('demande', ChoiceType::class, [ 'label' => 'Type de demande', 'placeholder' => 'Selectionnez le type de la demande ▼', 'choices' => [ 'Demande d\'information générale' => 'Demande d\'information générale', 'Demande d\'information tarifaire' => 'Demande d\'information tarifaire', 'Proposition commerciale' => 'Proposition commerciale', 'Autre' => 'Autre', ], 'property_path' => 'type' ]) ->add('message', TextareaType::class, [ 'label' => 'Votre message', 'attr' => [ 'rows' =>'5', 'cols' => '50' ], ]) ; } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => Contact::class, ]); } }