<?php

namespace App\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
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
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('lccap', HiddenType::class, array(
                'attr' => [
                    'class' => 'lccap'
                ]
            ))
            ->add('firstname', TextType::class, array(
                'attr' => array(
                    'placeholder' => 'Prénom'
                )
            ))
            ->add('lastname', TextType::class, array(
                'attr' => array(
                    'placeholder' => 'Nom'
                )
            ))
            ->add('email', EmailType::class, array(
                'attr' => array(
                    'placeholder' => 'Email'
                )
            ))

            ->add('object', TextType::class, array(
                'attr' => array(
                    'placeholder' => 'Objet'
                )
            ))
            ->add('message', TextareaType::class, array(
                'attr' => array(
                    'placeholder' => 'Message'
                )
            ));
    }

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
                                   // Configure your form options here
                               ]);
    }
}
