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
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
> >
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
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
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
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
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}
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?
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