<?php
namespace App\Form\Contact;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
class ContactType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', null, [
// 'label' => 'app.contact.form.name',
'required' => true,
'attr' => ['placeholder' => 'app.contact.form.name']
])
->add('contactEmail', null, [
// 'label' => 'app.contact.form.email',
'required' => true,
'attr' => ['placeholder' => 'app.contact.form.email']
])
->add('contactPhone', null, [
// 'label' => 'app.contact.form.phone',
'required' => true,
'attr' => ['placeholder' => 'app.contact.form.phone']
])
->add('subject', null, [
// 'label' => 'app.contact.form.subject',
'required' => true,
'attr' => ['placeholder' => 'app.contact.form.subject']
])
->add('message', TextareaType::class, [
// 'label' => 'app.contact.form.message',
'required' => true,
'attr' => ['placeholder' => 'app.contact.form.message']
])
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
// Configure your form options here
]);
}
}