Closed (fixed)
Project:
Hierarchical Select
Version:
5.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
27 Jun 2008 at 20:36 UTC
Updated:
12 Jul 2008 at 12:24 UTC
Jump to comment: Most recent file
Comments
Comment #1
wim leersUse a content_taxonomy CCK field instead, that supports it. HS is just a widget, it only presents data that it has been fed.
Comment #2
vacilando commentedWell, I've been thinking the last three (small!) hours and I am now sure there is a good reason to have that functionality in HS.
The reason is that some vocabularies are huge and it would be counter-productive to try to browse them from level zero.
Browsing from a deeper level is probably a solution, but a question for you / HS is where to start and set it up.
But the solution could be extremely simple -- just allow the 1st field to be a simple autocomplete (pending preferences). I am afraid I am no Ajax master but I believe swapping an Ajax select box by an Ajax autocomplete box should be a question of minutes for a Drupal ninja like you.
This would be just fantastic because the person would type a term that would autocomplete, and then s/he could complete the lineage selection with a few quick keystrokes.
Please let me know what you think; I hope you will be equally excited.
Comment #3
wim leersI can see why you would want that in HS. But HS is just a widget. It should be configured in the "thing" (whether that be a CCK field or something else). That's where it belongs.
Also, I don't want to make HS any bigger than it already is.
And really, you *can* do this using a content_taxonomy CCK field. See the attached screenshot.
Comment #4
vacilando commentedThanks, Wim!
In the meantime I've realized that I did not properly appreciate your explanation: HS is just a widget, it only presents data that it has been fed. So yes, you are correct - HS is not a CCK element, so it cannot do this.
But, unfortunately, the solution you have suggested for selection of the root term is not a satisfactory because I need to set a different root term on each page! That is why I need to be able to autocomplete type it.
Any final ideas on this?
Tomáš
Comment #5
wim leersWhy do you need it to be different on each page? Then you would also have a boatload of config forms to go through. So in that case, it would be much better to write your own implementation of HS. You'd only have to implement the _root_level() hook and the rest of the hooks would be simply aliases of the taxonomy implementation.
You'll only be able to do this if you're a developer though.
Comment #6
wim leersTo show you how little you'd have to change, it'd only be this:
to:
And add another "param" to the required parameters called
root_tid.Comment #7
wim leersThis just made me realize that I'm not yet supporting this at all in the content_taxonomy implementation! I've never had complaints about it because … nobody uses it.
EDIT: created an issue for this: http://drupal.org/node/276041. Note that this means you'll be able to simply use the content_taxonomy implementation, all you will have to do is define the form using the Forms API.
Comment #8
vacilando commentedThat seems rather simple and I should be able to do this. OK, so I'll watch the other thread - hope it will not take too much work for you to fix that. Thanks for your excellent work!
Comment #9
wim leersDone! Check the other thread ;) :)
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.