In case you miss the other thread: you need to call set() before rendering the view because the view's copy of the variable is not changed otherwise.
On Sun, Aug 30, 2009 at 9:33 AM, FrederickD<manzanillo.engl...@gmail.com> wrote: > > I understand. That is what I would like to do; have the first row be > 'Please select...' so that the observeField 'sees' a change in the > field. > > I am just not sure how to push an entry into element 0 of an array > that has already been loaded by a find('List'), and thereby pushing > all the other elements down by one. > > This was an interesting thread: > http://groups.google.com/group/cake-php/browse_thread/thread/a342e152400d0d88?hl=en > > The suggestion there is to use array_unshift($isps, array > ("none"=>"None of the above"));. > > I tried that and placed the array_unshift just before the render > statement, but to no avail. Is my code, and or placement, incorrect? > > Thank you! > > On Aug 30, 3:48 am, WebbedIT <p...@webbedit.co.uk> wrote: >> As brian states you add the blank entry to the arrays that you pass >> from the controller to the view. >> >> So the $states, $counties and $cities arrays need to include the blank >> 'Please select ...' options as their first row. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---