<?php
namespace App\Form\Front;
use App\Entity\FormContact;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
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 FormContactType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('typeConsultation', HiddenType::class)
->add('typePerson', HiddenType::class)
->add('documentType', HiddenType::class)
->add('documentNumber', HiddenType::class)
->add('company', TextType::class)
->add('name', TextType::class)
->add('department', TextType::class)
->add('phone', TextType::class)
->add('email', TextType::class)
->add('message', TextareaType::class)
->add('utmSource', HiddenType::class)
->add('utmMedium', HiddenType::class)
->add('utmCampaign', HiddenType::class)
->add('utmContent', HiddenType::class)
->add('utmTerm', HiddenType::class)
->add('gclid', HiddenType::class);
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => FormContact::class,
]);
}
}