Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a taxonomy term reference field that is exposed as a filter. I only want to show some of the terms, so I am using the "Limit list to selected items" option.
However, when I use this option, the checkboxes are displayed without being checked:
If I turn off the "Limit list to selected items" option, then the selected items will appear checked in the display. I expect that the same should happen even if the option is checked, since by default all of the displayed items are searched, but it does not.
Comment | File | Size | Author |
---|---|---|---|
agerange2.jpg | 4.05 KB | ptmkenny | |
agerange.jpg | 15.65 KB | ptmkenny |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI think that this is not a bug of better exposed filters...
the "Limit list to selected items" option is part of the views module (views\handlers\views_handler_filter_in_operator.inc) and does exactly what it says: limit the amount of items shown in the filter; it doesn't say that the items will be checked.
Also, if none of the checkboxes are selected, means that no filter is applied.
Comment #2
mikeker CreditAttribution: mikeker commentedIssue queue cleanup... My apologies for taking so long to address this issue!
@buzkall is correct in #1. It is an unfortunately design issue in Views that the same field is used to select the default values as is used to limit the number of options -- meaning you can't both limit the options and pick a default value. Unfortunately, there's nothing BEF can do about it.