<?php
namespace App\Form\Front;
use App\Entity\FormPromotion;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class FormPromotionType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('promotion', 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('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' => FormPromotion::class,
]);
}
}