2

I am using a term reference field but the widget type is autocomplete term widget. This term consist of many levels as parents and child. In the form I need to display only the child terms(only the lowest level in my case 3rd level) in this field. How can I do this. Please anyone help me on this. Thanks

  • 1
    Can you create your field via Views or it should be a CCK field? – Sohail Sep 10 '14 at 10:56
  • 1
    Its not a field in views, it is a CCK field – Aswini K Sep 10 '14 at 12:07
1

There's a GREAT module for this type of configurations called Hierarchical Select

Hierarchical Select has the ability to save the entire lineage of a selection or only the "deepest" selection. You can configure it to force the user to make a selection as deep as possible in the tree, or allow the user to select an item anywhere in the tree. Levels can be labeled, you can configure limit the number of items that can be selected, configure a title for the dropbox, choose a site-wide animation delay, and so on. You can even create new items and levels through Hierarchical Select!

This module has a lot to offer, but as for your need, it also does the trick. Also you might want to consider Taxonomy Term Reference Tree Widget as well, the main functionality is a different thing but you can define a permission via views to do what you are after too with this module.

  • 2
    Thanks Sohail. But my field should be autocomplete not Hierarchical Select. – Aswini K Sep 10 '14 at 11:24
1

Maybe the Hierarchical Term Reference Autocomplete module could help you. It seems to combine the restriction of level of Hierarchical Select module (select only level 3 for you) and the Autocomplete widget.

  • 1
    Thanks. I tried with this module and configured the depth level as 3. But Auto-complete is not working. Is anything more to be done on this. – Aswini K Sep 11 '14 at 5:19
  • 1
    I tried on simplytestme and autocomplete worked fine: awesomescreenshot.com/0033gv4vc2 – Djouuuuh Sep 11 '14 at 7:59
  • 1
    Thanks. This is not working for me, its may be because of any missing configuration. Can you please attach the settings you made on this field. – Aswini K Sep 11 '14 at 9:49
  • 1
    Nothing special, I just attached the Hierarchical Term Reference Autocomplete widget to the taxonomy field. It did the rest :-o Could you please try on Simplytestme too to see if you still have the problem? – Djouuuuh Sep 11 '14 at 9:54
  • 1
    Yes it is working in Simplytestme. Don't know why it is not working in my project. But actually I need to display only the lowest levels. Here we can select values in all levels. I need to restrict this to 3rd level. Any idea on this? Thanks. – Aswini K Sep 11 '14 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.