This looks like the module I need, but need some advice:

I have a CCK form (D6) for entering data for a real estate site, eg, info about a particular condo building. I use content_taxonomy for this in general, when the number of terms is reasonable, but in one particular case, selecting country -->province -->district -->town, the final list of "town" for the entire country has thousands of entries (obviously gets completely untenable with multiple countries), so therefore I need a way of narrowing the hierarchical choices, by parent, and populating all the respective fields in the form with all of the sub-category choices in the hierarchy.

Lots of websites use dependent dropdown box functionality, particularly sites that have large catalogs of stuff to wade through. In the past this was all done with page refreshes, but that's old school. I just need a way to select a chain of terms in some way so as not to have to look through a list of 5000 towns in a hierarchical menu. I could I suppose resort to the "auto-complete" technique, but prefer a drop down list.
There are other solutions in D5, but none appear headed to D6.

Is there another, perhaps even clumsier way to accomplish this without custom code? Separate drop down boxes for each parent, ie, country, province, town, are acceptable. This functionality is pretty basic to websites, so I'm surprised this doesn't have a much higher priority for D6.

Tnx, Jeff

Comments

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Status: Active » Postponed (maintainer needs more info)

I'm not entirely sure what the question is? Please clarify what it is that you're looking for:
- an alternative to Hierarchical Select?
- or a way to use Hierarchical Select with custom, non-taxonomy data?

dejamuse’s picture

I need a way to enter country, province, city data in an entry form (CCK). Usually you see this on websites as three drop down boxes. First select the country from the 1st drop down list, and it gets entered in the form, then the 2nd drop down box shows the provinces for the selected country, and finally the 3rd shows the cities for the selected province. All three get entered into the form. Some people call these dependent drop downs. The listings of the countries, provinces, and cities are all stored in taxonomy. I don't necessarily have to store the data in taxonomy, but it just seemed appropriate, especially since my end user will want to add to it from time to time and it's got to be dumbass simple to do, like uploading CSV files for each new country. Not sure how else you'd get the country/province/city data into the DB without custom code or a module.

I would want to use views too in order to do things like show all one bedroom condos in a certain city.

It seems hierarchical select in conjunction with content taxonomy would do this in a condensed, easier way.

Not knowing a stitch of PHP or SQL, I can't really program this myself, though it doesn't sound as though it would be that conceptually difficult. I don't even really need AJAX for now. I'd be satisfied with page refreshes.

I only ask if there's another way to do this as it seems the stable version of hierarchical select, especially for use with content taxonomy in D6 is a ways off.

This module does almost what I want but it's D5 only and no indication of being ported to D6, and it appears as if he resorted to autocomplete rather than a large taxonomy - not sure why - a performance hit maybe: http://drupal.org/project/FixedDataDropdown

A Google search for "dependent drop down list php mysql" turns up plenty of examples, including this extension for Dreamweaver: http://www.tecnorama.org/document.php?pageNum_da_comments=3&id_doc=62

This guy has a good explanation with code examples: http://www.javascripttoolbox.com/lib/dynamicoptionlist/

Tnx, Jeff

Wim Leers’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

The Hierarchical Select Taxonomy Views module hasn't been ported to Drupal 6 yet, so that's not yet supported.

"This module does almost what I want but it's D5 only and no indication of being ported to D6"
Twice wrong.
- This module does *exactly* what you want, on D5.
- This module *has* been ported to D6, but the integration with other modules hasn't been ported completely yet.

See this issue: http://drupal.org/node/342991.

dejamuse’s picture

That link appears to pertain to HS, not this other module I was referring to named Fixed Data Dropdown:

http://drupal.org/project/FixedDataDropdown

I think you didn't catch that when I said "this module". I should have been more clear.

Fixed Data Dropdown does almost everything I want, but the developer seems to have some issue with large taxonomies and prefers autocomplete fields. Not sure I understand what he's getting at.

Two other D5 modules appear to be relevant too: Taxonomy Multi, and Taxonomy Strider, both of questionable status, and no indication of D6 activity.

Again, I think this functionality is so common in websites it should be receiving much higher attention and visibility in D6.

You've done a magnificent job thus far considering your workload, but I'm curious why some other high profile developers in the Drupal community haven't stepped in to help move it along faster, especially in light of many user comments testifying to the importance of this functionality. That said, any guess as to when a stable, and complete D6 version will actually surface?

BTW, the HS module got a write up in Victor Kane's new book, "Leveraging Drupal", on page 345:

"This module is really part of what I would all "the quiet revolution" in Drupal modules, and greatly enhances usability."

....Jeff

Wim Leers’s picture

Status: Closed (fixed) » Active

I'm sorry, I missed your reply because this issue was marked as closed. Please mark it as active again when you reply next time :)

You've done a magnificent job thus far considering your workload, but I'm curious why some other high profile developers in the Drupal community haven't stepped in to help move it along faster, especially in light of many user comments testifying to the importance of this functionality. That said, any guess as to when a stable, and complete D6 version will actually surface?

Thanks! :) I'm not sure why other high profile developers haven't stepped up. Maybe because it scares them, because in the end, I'm doing some really trick Forms API stuff. And the other bigger portion of the code is for building the hierarchy depending on the configuration that's passed in – that code is also pretty complex (well documented, but still hard to get into, and in need of a more cleaner rewrite).

The Drupal 6 version is already virtually as stable as the D5 version and in production use. The problem is that not every integration with other modules has been ported yet. Especially Taxonomy Views and Content Taxonomy (Views). The patch for the latter is stable it seems, but I still need to review it. The patch for the former has just been contributed and is also in need for a review by me.
Add to that that I've replied to 22 issues at the code sprint (see http://wimleers.com/blog/drupalcon-dc) and have been replying to at least that many issues after the code sprint, and you'll agree that we're moving forward fast now :)

The D5 final will be out in a couple of weeks. A D6 beta will be out around the same time.

BTW, the HS module got a write up in Victor Kane's new book, "Leveraging Drupal", on page 345:

"This module is really part of what I would all "the quiet revolution" in Drupal modules, and greatly enhances usability."

Cool! I didn't know that :) I'll talk to him to see what else he wrote about HS.

Finally, I have some very good news for you. "Fixed data dependent dropdowns" are now possible through Hierarchical Select, thanks to the Small Hierarchy module. Look at the documentation for the _hs_smallhierarchy_transform() function to find out how to use it. I'll make the documentation more visible/accessible when I find the time … or you could contribute it :)

Wim Leers’s picture

Status: Active » Closed (fixed)

Since you haven't responded yet, I contacted you through your contact form to notify you of my reply. Closing this issue because I'm cleaning up the issue queue. Please mark it as active again when you post a reply :)