You are doing a great job! I liked the original HS module, but it was buggy and with many useless features. Your is already much better.

So, some related feature I am missing, which could ease a bit styling of forms:
1. Drop down to the bottom, not to right
2. Show main select box AND select box for each child term level, like if

Grand-parent
-Parent
--Child

Then there will be already 3 select boxes, but Parent and Child ones will be disabled or unpopulated, until Grand-Parent is selected.
I am sure, that this is simple request, and yet is a life saver when building classic-feel vertical forms. I missed this in original HS.

Comments

stBorchert’s picture

Status: Active » Closed (won't fix)

Great to hear you like this module.

1. Drop down to the bottom, not to right

This can be done by adding some lines of CSS to your theme:

.form-item .shs-select {
  display: block !important;
}
2. Show main select box AND select box for each child term level

This isn't possible at all since the number of levels may vary depending on the current selection.
Example:

* Item 1
** Item 1.1
*** Item 1.1.1
** Item 1.2
*** Item 1.2.1
*** Item 1.2.2
**** Item 1.2.2.1
** Item 1.3

How many elements should be displayed in this case?

The main intention for this module has always been (and will be) to "guide" the user through a term hierarchy. Since this hierarchy (respectively the children) depends on the last selection it won't be possible to initially display one element per level.

PlayfulWolf’s picture

1. Got css thing if it is that simple.
2. In your example there wil be 4 select boxes as the deepest item is "1.2.2.1". The logic is fairly simple - you just need to get the deepness of the vocabulary and display exact amount of select boxes. If selected term is not form the deepest level, like "1.3", then just leave next 2 select boxes as is (disabled or unpopulated).
I know it just looks like it is a simple feature, but this is one of needed things when building forms for non-IT personnel where every screen flicker matters.

PlayfulWolf’s picture

Real world examples:

1.Cars (category)
1.1. BMW (manufacturer)
1.1.1. 3series (model)
1.1.1.1. 325 (modification of model)
2.Trucks
2.1. MAN
2.2. Kenworth

In this case again there are 4 select boxes, but if the MAN/Kenworth is selected, 2 of them are visible but disabled. All the time the last term is selected - it does not break this module purpose!

Another (list to buy)
1.Toilet paper
2. Food
2.1. Fruits
2.1.1. Bananas
2.1.2. Apples
2.2. Bread
3. Beer
4. Soap
5. Cat food

In this case 3 selects are shown, but if "Beer" is selected - other 2 are left unpopulated.

I know this is 90% of theming issue, the only logic is to count the levels of taxonomy and display that exact amount of selects

stBorchert’s picture

Sorry, but this won't happen. This is simply not the way a hierarchical select should work.

Just as a note: we are using the module on a site with vocabularies having dozens of levels. Now guess how this would look like if all these elements are displayed all the time ...

PlayfulWolf’s picture

Yep, if there are 5 or 10 or 50 levels - yes it will be nonsense, but if there are up to 3 levels it would look nice.
Btw, not all elements are displayed! Only the empty select boxes.

I'll give an example: http://eng.auto24.ee/main/mainindex.php in the top left is a form, "Make" and "Model" are shown, but "Model" is unpopulated by default. As you can see there are just 2 levels of vocabulary and 2 selects are shown.

stBorchert’s picture

This is a use-case handled by http://drupal.org/project/conditional_fields.

PlayfulWolf’s picture

The last time I played with it - it was not for this task. I will double-tripple check it, but very sure, that it is built for another case: when some option selected - add extra value.
Hierarchical select is for the task, but it is buggy, has many features but most of them do not work well.

PlayfulWolf’s picture

yep, Conditional fields is not for the task - or at least I do not know any similar documented examples. Haven't found an option to populate dependant field with different vocabulary on dependee change.

pinkonomy’s picture

Issue summary: View changes

I have the same question,how this can be solved for 2 levels taxonomy hierarchy?
I think it would help a lot of users if 2 or 3 levels shown by default.
If a patch were created e.g. for 2 levels taxonomy terms to show by default.
Thanks

hoangbien’s picture

Hello Friends,
I used "Simple hierarchical select (SHS)" for a vocabulary as city-district. The city is taxonomy term parent. The District is taxonomy term children of the city.
1. I want to add label for the taxonomy term children in the view.
2. I want to always display parent select box and children select box. (SHS display only parent select box as default. The children select box display when we choose a parent value.)
Image demo 1
Image demo 2

Help me please,
Thank you so much,

stBorchert’s picture

@hoangbien:
To get the labels you need to implement hook_shs_FIELDNAME_js_settings_alter().
Initially displaying both, parent and child is not supported by SHS (unless you set the default value of the field to a value being in the second level).

hoangbien’s picture

Thank stBorchert,
How to display all level select box?

Thank you so much,

stBorchert’s picture

@hoangien: As said before, this is *not* possible!

pinkonomy’s picture

"How to display all level select box?"

@stBorchert :I think this is a request from many people.
As the 90% of use cases have only 2 levels,it would be great if it existed ONLY for 2 level taxonomies.
Thanks