@ -7,6 +7,7 @@ use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||
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 ContactForm extends AbstractType
|
||||
{
|
||||
@ -16,4 +17,11 @@ class ContactForm extends AbstractType
|
||||
->add('message', TextareaType::class)
|
||||
->add('phone', TextType::class);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'csrf_protection' => false,
|
||||
]);
|
||||
}
|
||||
}
|
@ -24,6 +24,7 @@ final readonly class ContactService
|
||||
->htmlTemplate('email/contact.html.twig')
|
||||
->context(['data' => $data])
|
||||
->subject('Kontakt aufnahme')
|
||||
->replyTo($data->email)
|
||||
->from($this->senderEmail)
|
||||
->to($this->contactEmail);
|
||||
|
||||
|
Reference in New Issue
Block a user