0

I recently pdated my Drupal core to 8.9 and suddenly a functionality stops working.

I have a "Recipe" content type, it has a field of "Category" (field_category) which is Entity Reference: Node.

I tried to create a View and created a filter criteria field_category, and I want it to be Auto complete and Allow multiple selections.

I know its possible on Entity Reference Taxonomy, but currently its not possible on Entity Reference Node.

I found Views Autocomplete Filters (https://www.drupal.org/project/views_autocomplete_filters), but I want it to Allow multiple selections.

2
  • I'm trying to figure out how to do this in Drupal 7 (yes, I've told the site owner they need to upgrade, but here I am). I can't believe that I've been working on Drupal sites over a decade, and never realized that I can't "Allow multiple selections" on entity reference fields in views. It seems like such a basic thing. Sep 28, 2022 at 14:06
  • Follow up, this can be done with a contextual filter, use the "Raw value from URL", then you can add the ids as /1234+5678 etc., and to include all results, just use /all. This is fine for me since I am building an API, but it might not work if you need it as an exposed filter, but it gets the job done at least. Sep 28, 2022 at 14:28

1 Answer 1

0

I managed to solve my problem using this module:

https://gist.github.com/StryKaizer/ae1cb9abc4844a9e7ac12317a9d84a78

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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