Forums / General / Storing cities of a country in a dropdown box

Storing cities of a country in a dropdown box

Author Message

Robert Ledoux

Monday 04 August 2008 10:00:32 am

Hi everybody

I try to make a website with ez publish. I need to create a custom class for store and display my products. However, I need to know for all product where it is (geolocalisation)

I think to store that in my custom class "Products" this information but how ?

Can I make a dropdown box with all city of my country ? How do that ?
Can I separate state/city width 2 linked dropdown box?

Thanks a lot for your responses.

Chap

Łukasz Serwatka

Tuesday 05 August 2008 12:28:01 am

I don't know how many cities in your country is but I assume a thousands thus I don't see point in keeping all country cities in one dropdown box. Just use text string and let users to fill that filed. For states you can create new class and use object relation list which support dropdown list style.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Robert Ledoux

Wednesday 06 August 2008 4:31:08 am

Thanks for your answer Łukasz Serwatka.

Howerver, I founded this contrib "Datatype: eZCountry". Do you think I can make two other datatype named Region and city? I have read an article about creating datatype in an extension.

But now my problem is :
If a user selects "France" in the first attribute "ezCountry" on my object, can I propose to the second select box all the city in France. You now what I mean?

Thanks