Shouldn't be in afterFind? When data grabbed from DB, You iterate throug them and add do sth like this $this->data[$n]['User']['whole_name'] = $this->data[$n]['User'] ['name'] . " " . $this->data[$n]['User']['last_name'];
right? On Nov 6, 7:12 pm, David Roda <davidcr...@gmail.com> wrote: > Thanks euromark. > > what type of logic would I be performing in beforeFind() to accomplish this > goal? > > On Fri, Nov 6, 2009 at 6:01 AM, euromark (munich) < > > dereurom...@googlemail.com> wrote: > > > there are behaviours for that (multiple_display_field) > > or you do it manually by using "beforeFind()" in your model > > > On 5 Nov., 23:22, Dave <davidcr...@gmail.com> wrote: > > > Hi fellow CakePHP enthusiasts. > > > > I have a problem which I'm sure is probably pretty simple but I am not > > > sure how to do it. > > > > I have a standard Users table with first name, last name, etc. > > > > What I would like to do is set the displayField of the Users model to > > > a concatenation of first_name . " " . last_name > > > > Now I am thinking that I can accomplish this by creating a custom > > > field in my model which concatenates these two fields, and set the > > > displayField to this, but I am not sure how to go about creating the > > > custom field. > > > > Thanks in advance for any help! I really appreciate it. > > > > David Roda --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---