Sunday, August 30, 2009

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

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

No comments: