By foodbo on
Hi there,
I am trying to list all the countries from a drop down list, then list all the cities in the selected country.
does the Location module do the job or other better way to do?
many thanks.
Hi there,
I am trying to list all the countries from a drop down list, then list all the cities in the selected country.
does the Location module do the job or other better way to do?
many thanks.
Comments
Not sure which is the best
Not sure which is the best module, but are you aware how long this list will be? Even listing every country and its states/provinces gives thousands of entries (see http://www.commondatahub.com/live/geography/state_province_region/iso_31...) which makes it impossible to display in a drop-down list.
Thanks for the input. Well,
Thanks for the input.
Well, It would be difficult to list all in a drop down list but, what i would like is a bit like the hotmail registration, which list about 100 countries in a drop down list, then depends on which country is selected then only display all cities ( or just the main cities) in the second drop down list.
any idea how can i do that?
thx
Taxonomy is the easiest
You can use the import feature for Taxonomy. Just create two vocabularies one for country and one for cities. Then for each city you will have to specify the country.
You can use this module: http://drupal.org/project/taxonomy_manager
thanks vmatresu, I have tried
thanks vmatresu,
I have tried the demo of the module, it maybe too long to list all the countries on a page??? so can you just specify just to select only one entry?? and can that be displayed within a "scroll down" panel??
thx.
anyone has anymore idea / example would be appreciated, thx.
Example
This is how I implemented something similar (with taxonomy etc). You can see example here: Vanzari afaceri The website is in romanian, but you can see the dropdown named Judete (Counties) in the top left.
Also please see an advanced view here: Afaceri de vanzare where it's in another format.
Don't forget that view has pagination (how many items per page) and you can limit the number of items if you want to have less.
You can use my contact if you need more detailed information, but I think you can do it with taxonomy. I use Taxonomy manager and it's pretty good because you can delegate to other users and they can create new terms using a nice interface. You give users permission on just certain taxonomy types.
Valentin
I would like to know a bit
I would like to know a bit more detail of how u did that as well, i have installed CCK, and taxonomy_manager and enabled taxonomy, also managed to import all the countries. so how can i display in a drop down list??
many thanks.
Views + taxonomy
Basically once someone selects a country and a city a page should show, or whatever happens. This result you can put in a view.
Using the Views module is really easy.
You would follow the steps:
1. new node view, name it whatever
2. Chose output: Page or block (in my case it's a block
3. Under Page settings you can set what the url will be (you can style the result of the view later using css and a tpl)
4. Select the fields that you want shown (the result ) - this is under Fields
5. Now we create the dropdown as Filters : click on +, add Your_Content_Name.Countries, as a filter chose is one of and Force single (this means drop down, otherwise it will be a select box, where you can select more than one) and set this filter to exposed (this means it will show up so the user can configure it, otherwise is just for sql)
6. Add more fields/filters, you can add arguments, order of output etc.
Save the view and then you just need to go to blocks to show this block in your page (when you create a view in blocks mode, it creates a block that shows up in block administration).
Using views you can create really nice things, and it's a bit difficult to understand in the beginning how it works (especially if you don't have any DB experience), but afterward is really helpful.
I wanted to send you some screen caps so you could follow easier, but I don't know how to attach it here. You can use my contact and send me an email and I will email it to you or smth.
thx, i think i know what u mean.
not sure, am I misunderstand you. The result (cities) will be displayed on a view page or block page?? But it is possible to list all the result in another dropdown list as well??
my email address is bbx1000 (at) hotmail.com
thanks for you help.
Hi, How can you specify the
Hi, How can you specify the country for the city please? I do not understand this..sorry?
I understand having two vocabularies, but not how to relate them to each other.
Thanks a lot in advance for explaining this!
Greetings, Martijn
Use taxonomy, and make cck
Use taxonomy, and make cck fields with hierarchical select module.
thanks, for the keywords.
thanks, for the keywords.
I have tried the "hierarchical select" module's demo, it seems exactly what i am looking for but it is still in beta version for drupal 6.
guess i will spend a bit more time to try out this module, do you have any tutorial link or document to share??
many thanks.
Trust me you can use dev
Trust me you can use dev version of HS, as long as you don;t use it with Content profile module. It works great.
the problem is i am using
the problem is i am using content profile module as well, so what kind of known bugs with that??
another thing is how can i easily to import the cities for the country? I have imported the country list now... then what is the next step??
Ok, just read the issue for
Ok, just read the issue for content profile and HS. http://drupal.org/node/348677
so the problem won't fix for a while then
i am testing it anyway, i have imported a few cities for testing, so how can i create a CCK field on my profile for that?? do i need another CCK field module??
Content Taxonomy
it seems I need the "Content Taxonomy" for CCK field ?? but only support drupal 5 at the moment. or another way to do?
seems a very common thing to
seems a very common thing to do but why it is so hard in drupal???
anyone got more suggestions / examples??
many thanks
easy way to do that
easy way to do that you are looking for... check this one option trim
city and countries list
I am surcharge country list
SHS import list
Hi all,
I did once import the cities and states of turkey with taxonomy manager. It was very simple; I had a txt file of the city and state list like below and just imported it with taxonomy manager.
If we find a similar txt file like this of -Country --City we should have our solution right?
Great
i think Location module is the best idea for drop down,
perfect
I think just like you