- Issue created by @giuse69
- 🇺🇸United States apmsooner
There's also this one: https://www.drupal.org/project/cshs → . Need to research the best option to consider.
- 🇮🇹Italy giuse69
Yes, but CSHS does not fit for large taxonomies since it loads all the vocabulary terms and send them to the browser, the selection does not involve ajax loading while navigating the hierarchy.
- 🇺🇸United States apmsooner
I'm not going to integrate with SHS module. I don't particularly like the limitations with a single bundle requirement and I think theres a little too much going on with the approach not to mention the number of unresolved issues is concerning to me. I think I can create a much simpler alternative that serves the same basic need. Stay tuned.
- 🇺🇸United States apmsooner
This is first draft if you want to test out the patch. There's a few hardcoded styles just to get something visually appealing that I'll refactor but functionally... I think it's working really well. In the field settings, you'll see the new "Hierarchical select widget" as an option. Just use the default reference method for now as I haven't looked at the views option. There will be a couple extra settings at the bottom of the form:
- Force deepest level
- Show level labelsI think the descriptions are self explanatory. Try it out and let me know how it works for you. It should support multi-lingual and work fine in paragraphs as well.
- 🇮🇹Italy giuse69
You're great! It works with a couple of issues:
- language translation of taxonomy terms with Hierarchical formatter seems not to work here (always taxo term in default language is shown) but I think it's a problem of the formatter and not of this thread.
- when used with flexbox formatter (not stacked), the series of selection boxes have a white space below the label that is not present in other subfield (like a select list) so the selection boxes are not aligned.
cheersGiuse
-
apmsooner →
committed abeb7326 on 3.0.x
Issue #3491436 by apmsooner, giuse69: Support SHS widget
-
apmsooner →
committed abeb7326 on 3.0.x
- 🇺🇸United States apmsooner
The translations are working just fine in the widget as well as the formatter in my testing. The widget now supports views to control the 1st level of hierarchy although in most cases, the default formatter should be sufficient as we're only fetching the terms for each level to help with performance.