<?php
namespace App\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints as Assert;
class InvolvedPersonType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('involvedPersonSex', ChoiceType::class, [
'label' => 'Anrede',
'choices' => [
'Frau' => 0,
'Herr' => 1,
],
'placeholder' => '',
])
->add('involvedPersonLastname', null, [
'label' => 'Nachname',
])
->add('involvedPersonFirstname', null, [
'label' => 'Vorname',
])
->add('involvedPersonAddress', null, [
'label' => 'Adresse',
])
->add('involvedPersonPostcode', null, [
'label' => 'PLZ',
])
->add('involvedPersonCity', null, [
'label' => 'Ort',
])
->add('involvedPersonPhone', null, [
'label' => 'Telefon',
])
->add('involvedCarAssurance', null, [
'label' => 'Versicherung',
])
->add('involvedCarTyp', null, [
'label' => 'Fahrzeugmarke',
])
->add('involvedCarNr', null, [
'label' => 'Kontrollschild',
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'required' => false,
]);
}
}