0

I have two entity doctor and status, every doctor can add many status, I have this code:

private function createCreateForm(statut $entity)
{

    $form = $this->createForm(new statutType(), $entity, array(
        'action' => $this->generateUrl('statut_create'),
        'method' => 'POST',
    ));

    $form->add('submit', 'submit', array('label' => 'Ajouter'));

    return $form;
}.

This is status form:

$builder
    ->add('medecin', 'entity', array('class'=>'DoctorBundle:medecin', 'property'=>'id', 'multiple'=>false))
    ->add('text')
    ->add('description')
    ->add('image',new ImageType())
    ;`
Egon
  • 4,757
  • 1
  • 23
  • 38
Aymen Rahal
  • 53
  • 1
  • 7

0 Answers0