Hi,

I have a taxonomy term with two levels. I want to allow users to add new terms. However, the new terms can be only allowed in the second level. I have been struggling trying to deal with this feature. At the end I only achieved this feature modifying the code of the shs.js

I have modified the line

if (settings.settings.create_new_terms) {

writting this code instead of

if ((settings.settings.create_new_terms)&&(parent_value != 0)) {

Is there any way to include this feature in next releases?

Thanks so much
Javier

Comments

henrijs.seso’s picture

I like this idea, but setting for this should be placed in hook_field_widget_settings_form.

henrijs.seso’s picture

Also, quick css solution...

.shs-select-level-1 option[value="_add_new_"] {
  display: none;
  visibility: hidden;
}
stborchert’s picture

Status: Active » Closed (won't fix)

Sorry for the late response but this won't work since usefully the site builder does not know how many levels the hierarchy may have (the number of levels is not fixed).