<?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\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class AskRecoveryType extends AbstractType
{
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => null,
'translation_domain' => 'form'
]);
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('email', EmailType::class, [
'required' => true,
'label_attr' => [
'class' => 'sr-only',
],
'attr' => [
'placeholder' => 'Email',
'class' => 'recover-email',
],
])
->add('submit', SubmitType::class, [
'attr' => [
'class' => 'btn-lg btn-primary btn-block',
],
])
;
}
}