I am working on a site that will contain a list of entity locations. What I want to do is start "wider" and narrow it. (i.e. start by selecting country, then if we pick "United States" we next select the state, and so on.
I'm encountering a couple of issues/questions.
The first is one of terminology. If I select "United States", then the next option should be to choose a "State"; however, if I select "Canada", then the next option would be to choose a "Province" (Yes, I realize I could just call it "State/Province" but...)
I'm also unsure how to "relate" taxonomy lists. I'm setting it up so that there is a "Country" list, and then a "State" list containing the U.S. States, and a "Province" list containing the Canadian Provinces. But I'm not sure how to add the "logic" relating the selected country to its appropriate list. Again, I realize I could just have "States/Provinces" all in one big clump, but I'd like to keep it cleaner/more organized.
While I'm "showing my work"; I intend to have Country and Region (State/Province) and perhaps County (to narrow the area in question) in taxonomy lists, and then the individual entities would be set up as a Content type, which would contain the Address (City, State, Zip) and other information specific to the local entity. Am I going at this "right" or is there a better way? I've been working with Drupal for a while now, but this is my first site of this type, so I'm still working through all the logistics of it. I appreciate any direction anyone can offer.
Comments
Maybe group the labels, Hierarchical Select for GUI
About the labelling, perhaps pragmatically calling that level "State/Province" might work, like you suggest?
This would probably easiest allow a user to pick options one by one, and go deeper and deeper into a Taxonomy, if that's needed. I used Hierarchical Select in Drupal 7, but it looks like it has been replaced by these:
Labeling - "State/Province"
I've considered this, but I'm trying to keep things more clean and orderly. If I lump them all together in a "State/Province" list, a user has a lot to sort through (50 States in the US plus 10 Canadian Provinces, and 3 Canadian Territories.)
Yes, My intent is to start "wide" and go deeper. First, they would select their country. If they select the United States, they would then be prompted to select the desired State. And once that has been chosen, I may further narrow things by selecting a County.
I've been working with Drupal since about 2011-2012 (the D7 days). So I consider myself an "intermediate" when it comes to Drupal; however, as I mentioned in my initial comment, this type of thing is new for me on Drupal. I think what I want to do is all to do with a "relational" database. I'd have a first table for "Country", and that table would include "United States", "Canada", etc., which would each have their own item ID. "States/Provinces" could actually be put on one table together, as, based on which country was selected, it would only display items related to that country's ID. Then, if I wanted to go down to a "County" or some other regional designator, again, the State ID would show only regions related to that State. I know how to do what I want, in Microsoft Access, or something like that; I'm just not sure how the best way is to go about it within Drupal 11.
CSHS (?)
I'm taking a look at CSHS. From the profile, it seems like it may be what I want, however, the documentation on it is non-existant, other than what is on the profile page. So I'm still figuring it out.
There are multiple levels in
There are multiple levels in the address field that are used in some countries, like neighborhoods in, IIRC, China and Mexico. Those are defined in the address module, what I'd suggest doing is "localizing" the labels you use depending on what the user picks. If USA, "state", if Switzerland, "canton", etc.
Available for paid support, module development, migrations, consulting...