Monday, July 2, 2012

Re: Autocomplete field to populate a select input example?

Hi there.

I am assuming that you've got he autocomplete working. So what you basically need to do is to make an ajax call to retrieve all cities in that state once it is entered.
The ajax call should call some controller method that searches for and returns the cities (in the selected state) in json for example. Once it has completed you populate the select box. 
You will need to do this on every change of the "State" field.


On Monday, 2 July 2012 16:39:05 UTC+3, Michael wrote:
So I have an auto-complete field where you can type in the name of a state, and once it fills in the field, I want it to show another select input which is populated by all the cities in that state. Does anyone have a link to a tutorial or example of this? It will save me having to hack it together. Thanks


~Michael

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
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

No comments: