<?php
namespace App\Forms\Frontend;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class QuoteForm extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', Type\TextType::class)
->add('email', Type\EmailType::class)
->add('collectionPostcode', Type\TextType::class, array(
'label' => "Collection postcode",
))
->add('deliveryAddress', Type\TextType::class, array(
'label' => "Delivery postcode",
))
->add('descriptionOfGoods', Type\ChoiceType::class, array(
'label' => "Description of goods",
'choices' => array(
'Envelope' => 'Envelope',
'Box' => 'Box',
'Pallet' => 'Pallet',
'Other' => 'Other',
)
))
->add('serviceRequired', Type\ChoiceType::class, array(
'label' => "Service required",
'choices' => array(
'Same Day' => 'Same Day',
'Next Day' => 'Next Day',
'International' => 'International'
)
))
->add('quoteType', Type\ChoiceType::class, array(
'label' => "Quote type",
'choices' => array(
'Quote Request' => 'Quote Request',
'Online Booking' => 'Online Booking'
)
))
->add('save', Type\SubmitType::class, array(
'label' => "Submit",
'attr' => array(
'class' => 'btn btn-primary'
)
));
}
}