php - Add property to database with the controller -


my application have 2 entity user , status, every user can add 0 or many status, use entity user in status form, when user want add status can add status user choice field. want every status take automatically id user? remove part status form :

>add('patient','entity',array('class'=>'doctorbundle:patient','property'=>'id','multiple'=>false))

and change status controller:

$id= $entity->setmedecin();         $form = $this->createform(new statuttype(), $entity, array(             'action' => $this->generateurl('statut_create'),             'method' => 'post',         ));      $form->add('submit', 'submit', array('label' => 'ajouter'));      return $form; } 


Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -