find('list') only works with simple fields, you won't be able to do this. Still, it's easy enough with find('all') and Set::combine():
$people = $this->Person->find('all', array( 'fields' => array('id', 'firstname', 'insertion', 'surname'), 'recursive' => -1 )); $list = Set::combine( $people, '{n}.Person.id', array('%s %s %s', '{n}.Person.firstname', '{n}.Person.insertion', '{n}.Person.surname') ); On Feb 11, 9:25 am, roryy <[EMAIL PROTECTED]> wrote: > Hello cakephp friends, > > I have 2 tables. Communications and people. In communications/add i > want a list where you can choose one person from table people. But you > don't see his name, only his ID. I have these fields in table people: > > id > firstname > insertion > surname > > Can someone help me to make a list where you can see a persons > firstname, insertion and surname with find('list' , .....) in the > communication controller. > > Thanks in advance! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---