Slide 37
Slide 37 text
Form
public function buildForm(FormBuilderInterface $builder, array
$options)
{
$builder
->add('event', 'choice', array(
'choices' => $events,
'constraints' => new Assert\Choice(array_keys($events)),
'required' => true,
'attr' => array(
'class' => 'input-xlarge'
),
))
->add('first_name', 'text', array(
'constraints' => new Assert\NotBlank(),
'required' => true,
))
}