Ordinarily, you'd use the model's $displayField var. But, since you want a combination of 2 fields, you'll need to do a little more work. Have a look at the AutoFieldBehavior [1] or Set class.
[1] http://bin.cakephp.org/saved/30870 On Sun, Apr 12, 2009 at 8:08 PM, Don <[email protected]> wrote: > > Can someone point me in the correct direction. > > I have 2 tables in my db, one called books and the other authors. In > the authors table, I have a firstName and lastName field > > What I want to be able to do is when I add a new book, it belongs to > an author, I want to show in the drop down selection list lastName, > firstName. > > Is there an easy way to do this with the $belongsTo and $hasMany > variables?? > > Thanks in advance for any help > > Don > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
