<?php
namespace App\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
class SubscribeType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('subscription', HiddenType::class, [
'attr'=> [
'value' => 'subscribe',
],
])
->add('sumbit', SubmitType::class, [
'icon' => 'fas fa-heart',
'label' => 'S\'abonner',
'attr'=> [
'class' => 'btn btn-info',
],
'row_attr' => ['class' => 'ml-auto mr-auto w-100'],
])
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
// Configure your form options here
]);
}
}