As an example for multiple displayField, this is how I change (e.g. translate) my displayField for my Gender dropdowns.
http://github.com/ionas/sna/blob/master/www/app/app_model.php#L12 http://github.com/ionas/sna/blob/master/www/app/models/gender.php#L10 Skip the translation part by removing the inner conditions and foreach loop in the app_models find overwrite In the Gender Model one could easily add {n}.Gender.id to show id next to name. var $displayField = array('%s %s', '{n}.Gender.id', '{n}.Gender.label'); Works I think On Dec 8, 5:52 pm, Marco <marco.perg...@gmail.com> wrote: > Yes, it is what Marcelo already mentioned. > > On Dec 8, 10:56 am, Dave <davidcr...@gmail.com> wrote: > > > I asked about this a while ago and I know there is a multiple displayField > > behavior in the bakery > > > On Mon, Dec 7, 2009 at 8:12 PM, Marcelo Andrade <mfandr...@gmail.com> wrote: > > > On Mon, Dec 7, 2009 at 2:44 AM, Mohammad Raheel > > > <madyeepakis...@gmail.com> wrote: > > > > I want to use 2 Concatenated fields in $displayField variable in a > > > > model so that the view can show both FirstName and LastName in the > > > > dropdown selection. > > > > > var $displayField = "firstName"; > > > > > I need something like > > > > var $displayField = "firstName"." "."lastName"; > > > > This is not the correct syntax. About using more > > > than one field in displayField, I've found this old > > > ticket[1] and this article at bakery[2]. > > > > But, as Marco said, Set::combine is so powerfull. > > > Maybe you should give it a try. > > > > [1]https://trac.cakephp.org/ticket/644 > > > [2]http://bakery.cakephp.org/articles/view/multiple-display-field-3 > > > > Atenciosamente. > > > > -- > > > MARCELO DE F. ANDRADE > > > Belem, PA, Amazonia, Brazil > > > Linux User #221105 > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > > with their CakePHP related questions. > > > > You received this message because you are subscribed to the Google Groups > > > "CakePHP" group. > > > To post to this group, send email to cake-php@googlegroups.com > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.c > > > om>For more options, visit this group at > > >http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en