Re: Use of Multiple Fields in $displayField var in Models

2009-12-09 Thread j0n4s.h4rtm...@googlemail.com
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

Re: Use of Multiple Fields in $displayField var in Models

2009-12-08 Thread Marco
Yes, it is what Marcelo already mentioned. On Dec 8, 10:56 am, Dave 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 wrote: > > On Mon, Dec 7, 2009 at 2:44 AM, Mohammad Raheel > >

Re: Use of Multiple Fields in $displayField var in Models

2009-12-08 Thread Dave
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 wrote: > On Mon, Dec 7, 2009 at 2:44 AM, Mohammad Raheel > wrote: > > I want to use 2 Concatenated fields in $displayField variable in a > > model so

Re: Use of Multiple Fields in $displayField var in Models

2009-12-07 Thread Marcelo Andrade
On Mon, Dec 7, 2009 at 2:44 AM, Mohammad Raheel 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

Re: Use of Multiple Fields in $displayField var in Models

2009-12-07 Thread Marco
I think you can't do it. One solution: controller: $this->User->recursive = -1; $users= $this->User->find('all', array('fields'=>array('User.id', 'User.FirstName', 'User.LastName'))); $users = Set::combine($users, '{n}.User.id', array('%s %s', '{n}.User.LastName', '{n}.User.FirstName')); $thi

Use of Multiple Fields in $displayField var in Models

2009-12-06 Thread Mohammad Raheel
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"; The above statement is not valid in a v

MultipleDisplayFields Behavior - possible solution to handling multiple fields in $displayField

2007-05-25 Thread Travis Cline
Not claiming any beauty, efficiency or adequate testing here... : http://bin.cakephp.org/view/1976615209 This includes henthoca's beforeFind check as well. @see http://groups.google.com/group/cake-php/browse_thread/thread/d4aa1929ce4d61c7/edcacb9354ff1f7a I've assumed a default of "{first_name}

Re: multiple fields in $displayField.

2007-05-24 Thread AD7six
On May 24, 12:31 am, Ruud Gâst <[EMAIL PROTECTED]> wrote: > Hello there, > > I've been trying to fill a SELECT-tag by using the generateList > function, this works great! Although I want to fill it with multiple > fields from the table, eg. firstname . ' ' . lastname. How can I pull > this off?

multiple fields in $displayField.

2007-05-23 Thread Ruud Gâst
Hello there, I've been trying to fill a SELECT-tag by using the generateList function, this works great! Although I want to fill it with multiple fields from the table, eg. firstname . ' ' . lastname. How can I pull this off? Greets Ruud --~--~-~--~~~---~--~~ Yo