La Ferme du web - Les forums

Venez baraguiner avec la communauté !

Vous n'êtes pas identifié.

#1 19/05/2013 14:24:26

fst9
Membre
Date d'inscription: 19/05/2013
Messages: 1

Foreign key and FosUserBundle

Hi all , i use Symfony 2.2 + wamp

Q:how i can set value for a foreign key in my form type from the controller ? for exemple :

-Table A( a int (PK) , b string , #IdUser)
entity :A.php , controller AController.php , Form : AFormType.php
views A/new.html.twig

-Table fos_user ( iduser ) ( fosUserBundle )

in my "AFormType.php" i need to set the "IdUser" = Id of the user connected (from the session ) and it will be hidden , for the CreateAction()/NewAction() in the controller AController.php !!!!!

Hors ligne

 

19/05/2013 14:24:26

Botte De Foin Publicitaire


Pied de page des forums

Powered by FluxBB
© Copyright 2008-2009 - LaFermeduWeb.net