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

#4 tree_depth.PNG14.49 KBkaizerking
Members fund testing for the Drupal project. Drupal Association Learn more


stBorchert’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry, but what are you talking about? There is no setting "Tree depth" in Simple hierarchical select.

kaizerking’s picture

It 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

stBorchert’s picture

Uhm, 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?

kaizerking’s picture

14.49 KB

Yes, Hierarchical select

stBorchert’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

It 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.

kaizerking’s picture

Title: controllable Deepest level » selecting tree depth is not having any effect
Category: feature » bug

I 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

kaizerking’s picture

Title: selecting tree depth is not having any effect » controllable Deepest level
Category: bug » feature
kaizerking’s picture

Title: selecting tree depth is not having any effect » controllable Deepest level
Category: bug » feature

FYI :Those option which were shown are from content taxonomy Content taxonomy

gilsbert’s picture

Status: Closed (works as designed) » Needs review


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.


stBorchert’s picture

Issue summary: View changes
Status: Needs review » Closed (works as designed)

You 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.


 * Implements hook_shs_add_term_access().
function shs_access_shs_add_term_access($vid, $parent, $account) {
  // No new terms in 1st level and for all terms of level x.
  if ($parent == 0 || in_array($parent, $terms_in_level_x)) {
    return FALSE;
  return TRUE;
gilsbert’s picture

Hi @stBorchert.
Thank you!

kitikonti’s picture

Related issues: +#2099011: New levels limit