<?php
namespace App\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class ContactType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('firstname', TextType::class, [
'label'=> false,
'attr' => [
'placeholder' => 'Prenom',
'class' => 'form-control border-0 bg-light px-4',
'style' =>'height: 55px'
]
])
->add('lastname', TextType::class, [
'label'=> false,
'attr' => [
'placeholder' => 'Nom',
'class' => 'form-control border-0 bg-light px-4',
'style' =>'height: 55px'
]
])
->add('email', EmailType::class, [
'label'=> false,
'attr' => [
'placeholder' => 'Email',
'class' => 'form-control border-0 bg-light px-4',
'style' =>'height: 55px'
]
])
->add('content', TextareaType::class, [
'label'=> false,
'attr' => [
'placeholder' => 'Message',
'class' => 'form-control border-0 bg-light px-4',
'style' =>'height: 55px'
]
])
->add('submit', SubmitType::class, [
'label' => 'Envoyer',
'attr' => [
'class' => 'btn btn-primary py-2 px-4'
]
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
// Configure your form options here
]);
}
}