I wonder, if there is any way of filtering term reference field result's by views useing "Select list" widget? Like it is done in term reference tree widget or References module.

Comments

tekken’s picture

Can you give some details?

Bevan’s picture

Title: Term reference fitered by view » Allow term-references to be filtered by views
Project: Drupal core » References
Version: 7.7 » 7.x-2.x-dev
Component: taxonomy.module » Miscellaneous
Category: support » feature

I understand the question and am also wondering if there is a way to do this.

In one term-reference field I want to make only the parent terms in a hierarchical vocabulary selectable. If Drupal allowed a view to be used to provide the filtered list of terms, I could build a view which lists terms that have no parent term (pid IS NULL).

In another term-reference field I want to make only the deepest terms in the same hierarchical vocabulary selectable. I am not sure if views can do this. Hierarchical Select does let you do this one, but does not let you force "parents only".

I imagine such a feature would be make most sense in the References module.

Related: #1140938: Term reference & Content taxonomy autocomplete module

tekken’s picture

Do you know the filter by view functionality of the Taxonomy Term Reference Tree Widget: http://drupal.org/project/term_reference_tree

Does that do what you are looking for?

Bevan’s picture

I just saw that. It appears that it will do what I need and also solve the original poster's problem. I will try it out shortly.

tekken’s picture

Okay then we're having different problems. At first I thought the poster was describing something similar to a question I have about conditional taxonomy term references. But I already posted it myself, in case someone reading this can help: Filter taxonomy term reference vocab using other field's term selection

Bevan’s picture

Term Reference Tree indeed implements this, and is quite useful, but harder to configure for this specific feature than References module's implementation of views integration. So I think it is worth leaving open this feature request for consideration.

Niremizov’s picture

Yes, how it was already said - Term Reference Tree implements this feature... But the problem is that in some cases - there is a need to use "Select List" widget with Views filter in term reference field, for example:

When createing term reference field where must be choosen only 1 term from big vocablurary, also several term's schould be filtered...

Due to the large number of terms, use of Term Reference Tree is inappropriate, it will lead to huge tree in the form.

karens’s picture

Project: References » Entity reference
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: Miscellaneous » Code

There are no plans to expand the References module to include term references. This maybe belongs in the http://drupal.org/project/entityreference project.

johnv’s picture

subscribe.

damien tournoud’s picture

Status: Active » Closed (duplicate)

As far as Entity Reference is concerned, this is covered by #1253776: Add views support for providing a list of entities or bundles (views filtering, relationships, etc). Feel free to reassign to another project if necessary.