Hi,
First of all, thank you for this great module. I'm using it and will do if forever (I'm using large taxonomies, 10k terms, and it's impossible to select a term with a "full" list).
I have a few questions and comments.
1. It is possible, using the "Taxonomy Field -> Select List", to create a new term (like we can do using autocomplete) if I can't find the one I like? Let's say, I browse to BMW, and then I just have serie5, 6 and 7, but my node should go to serie 1, so how (a user) can create this term?? (I can, as an admin, go to the vocabulary and create a new term, but that's not what I want). As the creation of new terms is supported when using an autocomplete field, I imagine this will be relatively easy to accomplish. In the autocomplete field, I can disable the creation of new terms, but in the Select List there's no option to do it (enable or disable).
2. I have another field ( "Taxonomy Field -> Autocomplete") that is used to select a term from a different vocabulary.
Let's say that I have this vocabulary:
-Order1
--Family1
---Species1
---Species2
--Family2
--Species3
-Order2
--Family3
---Species4
---Species5
In that second field, the user will never change (add) the taxonomy, the user must be able to select "Species4" and that's all. This works, perfect, even the user can select "Family3" (that, in my case, should not be desired... any option to limit the selection to leaf nodes?).
My question is, how an user can know, when writing "species5" if that species is inside Family2 or 3....
With cars, maybe you can choose the term "GTi", but if you don't know if the parent of that term is Golf or... Polo, you really don't know which term are you selecting.
While using Select List, this doesn't happens, because you will be able to choose GTi, but you previously selected Golf, so you know where are you. I hope you understand the point.
So, a possible solution to "where is located that term in the hierarchy" problem will be display a "breadcrumb" above/below the autocomplete field, so when I write "Species5" and accept the result suggested, a line displays "Order2 -> Family3 -> Species5 selected", ... something like that will do the job really well.
3. When a user create a new term (using the autocomplete field), that term goes to the root of that vocabulary. Is there an option to create that term in a specify hierarchy? I know that in the autocomplete field, right now, you can't know in which deep of the taxonomy are, so maybe will be easier to create a new term (not on the root) using the Select List... but with the Select List I can't create terms right now!
Your module works great but in my opinion with a few more improvements will be much more useful. It's a bit strange to be able to create terms using one field but not with the other.
I hope you understand my queries. If not, feel free to ask for more details.
I could try to create several issues for each "topic" if you think it's more convenient.
Any suggestion will be welcomed!
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | suggest.png | 35.52 KB | ferrangil |
| #4 | hierarchical_select.module.patch | 2.41 KB | derjochenmeyer |
| #4 | hierarchical_select.gif | 3.63 KB | derjochenmeyer |
Comments
Comment #1
newtonik commentedHi,
Really nice module, I believe I will be using it for awhile. I was just about to ask abou this. I have a similar situation as mentioned above when you want the user to be able to add a sub term if its not in the select list. I tried to add a textfield to taxonomy fieldset similar to the autocomplete but save the value myself as a term. The is if I have the terms below,
Order1
--Family1
---Species1
---Species2
--Family2
--Species3
-Order2
--Family3
---Species4
---Species5
and I try to save a new item Species6 under Family3. I select Family3 and realize Species6 isn't there so I decide to add it in the textfield. The problem is once i select Family3 the seletedIndex is Species4, so I cannot dynamically get the parentid to store the term using taxonomy_save_term and taxonomy_node_save.
I agree with your suggestions and some of it seems to do more with the way drupal forces you to do things (or designed way). The taxonomy either allows you to create terms for users (select list) or a free for all tagging with (autocomplete textfield) which doesn't help situations like ours. Hopefully things change as we move forward.
Comment #2
ferrangil commentedPlease don't change the topic to "Same issue". Nobody will come to help us with that topic ;)
I have another short query. I read about that in other threads here in the issues, but I was wondering if it's still not possible (by design).
Can I select a term that is not a leaf term while using Select List? By default, the first term of the children is selected, so I imagine that we should have a child selected by default, and if this is the case, the term that will be finally associated will be the parent one. It's a bit annoying to not being able to select an intermediate term, because using autocomplete you can do it (I know, it's not the same... ).
Any option to do that?
Thanks!
Comment #3
wim leersYour last question has just been implemented: http://drupal.org/node/189975.
The ability to create new terms is not yet planned. Currently HS is all about browsing hierarchies, not about creating them. So for now, this is out of the scope. It's of course one of the next logical features. I'm postponing this for now.
Comment #4
derjochenmeyer commentedI tried to write something that could be a direction of how this feature could work. Im a drupal beginner. So this is just a naive, clumsy first step.
But however, the patch modifies only
_hierarchical_select_render_selects()function in the hierarchical_select.module as a proof of concept for myself. That function is probably the wrong place for this feature. AND its all packed into this function including css and inline jquery. AND Unfortunately it starts working just after the first dynamical form update. Couldn't figure out why.Maybe this is however helpful as a first step to this feature of adding to an existing taxonomy tree.
Just desperately trying to contribute ;-)
This is how the patch works:
/hierarchical_select_add/[vid]/[tid](vid = vocabulary ID, tid = parent term ID)Comment #5
wim leers1) It's indeed in the wrong location. It should have its own place. That can easily be fixed though, so this is very minor.
2) It's specific to the Taxonomy module. That's a real deal-breaker. The point of this module is to have it in an abstract way, so that it could work with any hierarchy.
3) This also conflicts with the multiple select support: this layout is too similar (and thus too confusing) to the "Add" button that exists for multiple select. (I just committed the initial version of multiple select support, feel free to check that out.) I feel that the best way to do this, is to have a Javascript overlay that allows you to add the term, like Thickbox for example. However, there's no easy way to do that yet in Drupal (at least not in Druapl 5, it's a lot easier in Drupal 6 I think).
Your attempt here is appreciated. I'm reconsidering the postponement of this feature now. I realize now that it's not all that hard to do. If you could come up with some solid suggestions how this should be represented visually, I'll probably work on it.
Comment #6
wim leersI'd still love to get some input on how to best present this feature. Usability of HS is currently superb, and I'd like to keep it that way.
Comment #7
ferrangil commentedWell, I don't think that something like derjochenmeyer suggests will broke the superb usability (I agree with that, now is great).
One point that will reduce some complexity is allow to the admin, from the vocabulary settings, to activate or not the option of adding new elements, so if your vocabulary is finite, users will see the same as they saw until now.
I like the "Add term" link, in red. For me, it is not confusing (maybe "Add new term" will work better).
Another option is display the "Add term" below each level (So, below Austria, one "Add term", below Region, another "Add term"...) but it's a bit stupid go in deep if what you need is to create, for example, another country.
Having a thinkbox poping up for the creation of the term will be great, but will broke a bit the "style" of the module.
I'll try everything you suggest. Just let me know!
Comment #8
wim leersIn single selection modus that's fine indeed. But try out multiple select. Now you will have an "add" button. And this "add term" link. That is what would be confusing.
Comment #9
ferrangil commentedYep, I tried now multiple values, and will be too confusing having another Add term link (or button). We should avoid the word Add, so I suggest to use "Create new term", as it could be more explanatory.
I attach an image, suggesting a new position for the buttons (comments in blue).
I like the way derjochenmeyer presents the creation itself, with something like "Create [___] in [parent term]". I think his suggestion goes to use the label name (Create Region to [parent term]), but, as labels are not mandatory, it's better to not use them for this.
By the way, I love the way you resolve the Multiple values selection. I don't need multiple values but looks great.
Comment #10
wim leersVery interesting! Excellent suggestions. Thanks :)
I like the idea of only displaying the "Add" button when appropriate, and under the level that would be added. What I don't like, is the added whitespace. And the fact that the page layout will shift when the "Add" button would be hidden/shown.
However, this will require a fair amount of work, so I will postpone this until the next "feature release" of HS, which should be version 2.1. Somewhere in the next few weeks I should have time for it, currently I have too many other things going on. Patches are accepted of course.
If we want to go really fancy, we could display an arrow from the "Add" button to every term that would be added. That is, when the "save term lineage" option is enabled, it would show arrows to all terms (in the case of your last example). But then again, that may be too overwhelming. And especially: very hard to code.
Comment #11
ferrangil commentedGreat! I'll wait impatiently to see new releases ;)
As it is just an Add button, you can reserve that space always (it will be just a line) to avoid moving all other fields from below that page...
Regarding your last feature, i think it's not so important to display arrows (or something to indicate that all the terms are selected). The user should know that all path is selected, or not, but the fact is that a common user will not be able to change the "save term lineage" option. They will select London, and if UK is selected or not, will not be too important (in that page, for the user I mean).
I wish I could work in the code, but I'm not yet ready...
Comment #12
ferrangil commentedCome on, Wim!
Looking forward to see how the Status changes from postponed to active.. (or even fixed! :) ).
You can do it...
Comment #13
wim leersIt won't happen any time soon ;) After my exams perhaps, which is in about 2 months.
Comment #14
armand0 commentedI try to use the NAT module. And it work fine only if I choose "Save the only deepest term" in Save lineage option. In this case, save the Title node like a new taxonomy term, and save in the correct lineage position. But if I choose "Save term lineage" in the taxonomy option, then save the title node in all term itself and all its ancestors.
Comment #15
wim leersThis is a feature request, you're reporting a problem. Please make a new issue for that. Also try to explain it more clearly (e.g. what's the NAT module and what's "the title node"?).
Comment #16
wim leersDevelopment of this feature will probably be sponsored (somebody has contacted me for this).
Obviously this will change the API, so this will be one of the major new features in HS 3. I'll start working on this in about 4 weeks.
Comment #17
ferrangil commentedThat's great! I'll test whatever you release. This functionality will be very important for me also.
Thanks! And good luck with your exams!
Comment #18
wim leersWork on this will be started next week, after this gets in: http://drupal.org/node/226067.
Comment #19
wim leersI had hoped to start working on this in the past weekend, but school work deadlines prevented me from doing so. I should have time for it this weekend.
Comment #20
32940stf commentedI am also looking for functionality much like described and am more than willing to help test.
Comment #21
wim leersExcellent. I'll definitely need testers for this.
Comment #22
francewhoaSubscribing. I can offer testing too for this new feature.
Comment #23
jrbeemanI'll be happy to test, as well.
Comment #24
wim leersI've now really begun working on this.
Although I much appreciate derjochenmeyer's and ferrangil's mockups, I dislike them for only one concern: they don't play nice when enforce_deepest is enabled (i.e. you can only add items below the deepest level).
I've got two other ideas:
1) Add a "<create new item>" option to each select. The only problem is that this will not allow you to create new levels. Depending on your needs, this may be good or bad. This requires less space than the provided mockups.
2) Add a "create new term" link, after this link is clicked, you get radio buttons (with (optionally?) a per-level text like "new country", "new region", etc.), one below each select, plus one below the deepest level. This one is the most clear on what will happen and can work for all use cases. I think it's slightly less intuitive though.
Other remarks:
1) We want to limit the number of levels per hierarchy. This has to be configurable.
2) Simple permissions (i.e. for-all-roles) or per-role permissions?
Feedback is welcome!
Comment #25
snufkin commentedHow about adding a create new term to the selection of the last dropdown? I like the idea of having the "create new item/term" in the select list, because it would not overcrowd the form.
Comment #26
wim leerssnufkin:
For clarity: what I called a "select" is what you call a "dropdown".
So what solution would you propose to this problem? Don't forget that I want the ability to create new items both in existing levels and in a new level.
I agree that this is the cleanest idea, simply because it doesn't require any additional screen space.
Comment #27
snufkin commentedYes, dropdown = select.
I would propose you add the
<create new item>to each select, and to the last level you could add another<create new level>or similar options. When it is selected it would act similarly when you select a new parent term, and the next select appears, but instead this time the new select has only one option:<create new item>.The problem I see with this is that you can't add levels in between, but i am not sure that is the goal here anyway.
Comment #28
wim leersLOL. Why didn't I think of that? I guess it's because I prefer symmetry by nature, so having more "special options" in a select than strictly necessary is blocked out of my mind?
Excellent feedback. Thanks! So far this is the best approach, IMO. I'll wait one more day to get more feedback and then I'll start implementing it.
Comment #29
jbrown commentedI'll test this for you once its in -dev.
Comment #30
32940stf commentedin the dropdown value
<create new item>, is it possible to have the wording configurable so in the example where we are building a geography taxonomy the province/state level will have the corresponding<create new state or province>. I think this type of thing goes a long way in usabilityComment #31
wim leers@32940stf: that's already supported! :)
It's finished: http://drupal.org/node/200285. Two quick demos:
- create new item: http://dl.getdropbox.com/u/12592/create%20new%20items%20demo.mov
- create new levels: http://dl.getdropbox.com/u/12592/create%20new%20levels%20demo.mov
Instead of providing a patch, I've just gone ahead and committed it. You can review it now, and I'll commit fixes as we go. It's possible that there still are bugs, but there shouldn't be many, as I tested it thoroughly in Safari and FF. Please test in IE though!
Note to self: update the RTL css.
Comment #32
summit commentedHi Wim, Am on holiday now, Back in town 12th may. Will test it then. Thanks a lot for it in advance!
Other testers, good luck with testing! Greetings, Martijn
www.trekking-world.com
Comment #33
nath commentedThis sounds interesting.
As for permissions: Those should be either as they are for regular creation of new terms or an extra field for this module. Not all users allowed to select terms should also be able to create new ones.
Comment #34
wim leers@nath: that's not supported by the core Taxonomy module either. But I agree that it would be a very helpful addition.
Comment #35
wim leers32940stf has been testing this rigorously and has been reporting problems in new issues (which is good). So I'm marking this issue as fixed now.
Comment #36
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.