I finaly found what i'm looking for : The solution was the use of the 'method' option which let me choose the field i want to display from the foreign table.
Thanks public function configure() { $this->setWidgets(array( 'oid_cdp' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('CDP'),'method' =>'getNameres','order_by' => array('nameres', 'asc'), 'add_empty' => true)), On 16 sep, 18:26, ScherlOMatic <stefan.scherbich...@gmail.com> wrote: > Hello! > > I think there is more than one solution for your problem. > > Try to overwrite the '_toString()' method in the model > (TrackerManagerTable.class.php). Or create some own method and call it > from whereever you want. > > Why are you implementing this logic in the filter class? > > BR > > On 16 Sep., 12:34, ziclo <lauren...@gmail.com> wrote: > > > Hello, > > > In my form filters i want to display a "select" widget (multi > > choice). My problem is that the id appears but i want manager's name > > instead (relation one to many). I also want to display another field, > > manager's firstname. How can i do ? > > > Here is my formfilter class : > > > public function configure() > > { > > > //Widgets > > $this->setWidgets(array( > > > 'id_manager' => new sfWidgetFormDoctrineChoice(array('model' > > => $this->getRelatedModelName('TrackerManager'), 'add_empty' => > > true)), > > )); > > > //Validators > > $this->setValidators(array( > > > 'id_manager' => new > > sfValidatorDoctrineChoice(array('required' => false, 'model' => > > $this->getRelatedModelName('TrackerManager'), 'column' => 'id')), > > > )); -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en