Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
selecting tree depth is not having any effect.
parent :not selected any
I have 3 levels
Tree depth set to 2
but still user is able to select 3 level
Comment | File | Size | Author |
---|---|---|---|
#4 | tree_depth.PNG | 14.49 KB | kaizerking |
Comments
Comment #1
stBorchertSorry, but what are you talking about? There is no setting "Tree depth" in Simple hierarchical select.
Comment #2
kaizerking CreditAttribution: kaizerking commentedIt is not simple hierarchical select setting
it is the default field setting for the term reference field.which we can see at the bottom.
I think shs should respect the default field setting along with its own settings.parent term and selectable tree depth should be respected
if we have 5 levels we set the 'force the user to select deepest term level' and we set the depth 3. then the deepest term is level is 3.
pl let me know if you need more clarification
Comment #3
stBorchertUhm, sorry but the default term reference field doesn't have a setting like this either. Can you please attach a screenshot of your settings?
Do you have any other contrib module installed?
Comment #4
kaizerking CreditAttribution: kaizerking commentedattached
Yes, Hierarchical select
Comment #5
stBorchertIt appears you have installed Hierarchical Select (see descriptive text below "Number of values").
This is neither a setting of default term reference field nor Simple hierarchical select.
Comment #6
kaizerking CreditAttribution: kaizerking commentedI am sorry, You are right.
I apologize for this it is my mistake, I am so used to seeing that took it as default setting
Then perhaps we need this as feature
i am changing the issue category to feature request
Comment #7
kaizerking CreditAttribution: kaizerking commentedComment #8
kaizerking CreditAttribution: kaizerking commentedFYI :Those option which were shown are from content taxonomy Content taxonomy
Comment #9
gilsbert CreditAttribution: gilsbert commentedHI.
I would like to vote for this feature too!
Giving us a way to limit how many levels a simple hierarchical select will let users to create would bring SHS to a whole new level of usability.
I understand all the reasons to keep SHS as simple as possible, but this feature would bring us a very necessary option.
Please, think about it.
Regards,
Gilsberty
Comment #10
stBorchertYou may implement
hook_shs_add_term_access()
to deny creating new terms. Simply spoken you need to get a list of all terms of the level you'd like to deny creating childs for and use this as the base for the hook implementation.Example:
Comment #11
gilsbert CreditAttribution: gilsbert commentedHi @stBorchert.
Thank you!
Regards,
Gilsberty
Comment #12
kitikonti CreditAttribution: kitikonti commented