Quantcast

ZendX_JQuery_Form_Element_AutoComplete: Synchronize county and city fields

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

ZendX_JQuery_Form_Element_AutoComplete: Synchronize county and city fields

ivco_sa
Here it is:

I have two fields(country and city) on the page that are ZendX_JQuery_Form_Element_AutoComplete. They fetch data from a database - the country field from the country table and the city field from the city table. I'd like to have the city field to depend on the choice of the country in the country field.

What is the most elegant way to implement that?

I read a lot on the net like: http://zend-framework-community.634137.n4.nabble.com/How-to-Zend-Dojo-Form-Dependent-Selects-e-g-Country-City-td663650.html

I really hope that there is a nicer/simpler solution.

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

AW: ZendX_JQuery_Form_Element_AutoComplete: Synchronize county and city fields

tridem
This post has NOT been accepted by the mailing list yet.
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: AW: ZendX_JQuery_Form_Element_AutoComplete: Synchronize county and city fields

ivco_sa
I will take a look at those.

This is what I really want:
Example 1:
   Assume that the user has entered "Can" in the country edit box and they click on the city edit box.
   I'd like to sent "Can" somehow to the server and limit the query on the server. I would like to fetch all cities that are in all countries starting with "Can" and then populate the city edit box only with those.

Example 2:
   Assume that the user has entered "Canada" in the country edit box and they click on the city edit box.
   In this case the city edit box has to be populated with cities that are in Canada only.

Thanks very much!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

AW: AW: ZendX_JQuery_Form_Element_AutoComplete: Synchronize county and city fields

tridem
This post has NOT been accepted by the mailing list yet.
CONTENTS DELETED
The author has deleted this message.
Loading...