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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -