Answer the question
In order to leave comments, you need to log in
How to change filter element text in drupal 7 views exposed filter?
There are Views, the elements of the dictionary are displayed, the exposed filter is made in the form of a select, it is filtered by another dictionary:
1 - The name field from the term is displayed in the text of the filter element, how can I make it display another field, for example, description?
2 - How to make sure that the list of filter elements includes terms whose selection does not give an empty result?
Answer the question
In order to leave comments, you need to log in
Exposed filters is the usual form. That is, you can use hook_form_alter in your module to get and change the value of any form element.
Here is an example of a taxonomy field in an exposed form structure:
At a glance - in your case it should work like this:
Iterate through all the #option elements in the desired form field. For each of them:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question