Monday, August 31, 2009

Re: How may I 'trick' $ajax->observeField into firing with linked combo boxes?

Been a while since I did this but as CakePHP uses the id of each
record as the key I think I did

$array[0] => 'value';
ksort($array);

Should work as you can't have a primary key of 0 so it should always
sort to first, actually this would mess with an array sorted by a-z
values.

Ok, how about ...

$this->set('variableName', Set::merge(array(0=>'emptyValue'),
$listArrayFromCake));

Paul.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: