List filter for databasejoin element rendered as multi-select dropdown problem

juuser

Well-Known Member
I have several databasejoin elements rendered as multi-select dropdown.

List has a menu pre-filter to show only rows where element "active" value is "1", but list filter (dropdown) shows also values belonging to not visible rows. Element's "Filter Data" option is set to "Recorded Data".

This problem doesn't seem to occur with dbjoins rendered and normal dropdown.

Can anyone confirm this?

Thanks!
 
Confirmed.
Dbjoin multiselects are stored in a repeat table. Obviously it's taking the dropdown filter values from this table, so always showing only "recorded" data, not the one of the original lookup table but also showing all of these, no matter if there's a prefilter on the parent table.

Maybe you can replicate your pre-filter in "Filter where"
 
Thank you @troester !

Yup, could be replicated in "Filter Where", but in my case I have several menu items pointing to the same list with different pre-filters, so this unfortunately doesn't solve my case :(. And I'm trying to prevent many copies of massive list as long as possible.
 
Filter as autocomplete seems to do.

So I think it has to be fixed in plugins\fabrik_element\databasejoin\databasejoin.php
protected function filterValueList_Exact
 
Thank you for the hint!

Though I'm not sure I can get a grip on that with reasonable effort.
 
Did you try with your filter set to autocomplete?

For the fix:
I didn't find where to modify until now. It's not (or not only) in filterValueList_Exact...
 
Thanks for checking this!

Strange, but also auto-complete filter doesn't seem to work as expected, still all the options (including data from not visible rows) is displayed / suggested. But anyway, in my case I need dropdown.

Another weird thing, when I changed one filter in list to auto-complete (rest are all dropdowns), filter "submit" button appeared and the list does not filter "OnChange" anymore. "Filter trigger" in list settings is set to "On Change". So basically the same behavior when you enable e.g. range filter in list.
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top