Great!!!! I think i did it right 'coz it works!!!!
Thanks :D On Jun 18, 7:02 am, jota <jdeveloper.inxe...@gmail.com> wrote: > Had yesterdey something similar so I hope i can help you: > > new sfWidgetFormDoctrineChoice(array( > 'model' => > 'Department', > 'multiple' => > true, > 'method' => > 'getUsersKeyValue', > 'key_method' => > 'getName', //name of the department > 'table_method' > => 'findAll' > ) > ) > > implement in the Department model de method getUsersKeyValue returning an > asociative array (userkey => username) of the users. > > for example: > > public function getUsersKeyValuer() { > $keyValuePairs = array(); > > foreach ($this->getUsers() as $user) > $keyValuePairs[$user->getId()] = $user->getName(); > > return $keyValuePairs; > } > > I hope it works > -- 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