0

In my newly installed Drupal 8 project i have created a content type named "Hardware Type" (with several fields, like name, usage, requirements ), for which I have added a bunch of items, and another content type called "Hardware", with several fields (including "Hardware Type", taken from my previously created content type).

Now, I have a view for "Hardware", where I use an exposed filter, with different fields for "Hardware Type", "Price", "Manufacturer".

Currently, the "Hardware Type" is a a simple input[type="text"], where I can add IDs from "Hardware Type" and filter the list. What I want is this input to be a select element with a list of "Hardware Type" elements.

Is this possible with what Drupal 8 provides or do I have to create a module? I installed the alpha version of Better Exposed Filters and I making a mess with Reference Views but it looks like I need some basic step stones to figure out this apparently simple feature integration

  • By its nature, hardware type would better fit a taxonomy term than a content type. And if I recall correctly, taxonomies can be referenced with a select element when used in an exposed filter. – Neograph734 Jul 11 '17 at 10:46
  • Just checked, and taxonomies can make use of a dropdown (select) element in exposed filters. – Neograph734 Jul 11 '17 at 10:52
  • Sorry, I forgot to say that Hardware Type has several fields (not just the name). Maybe I could create a taxonomy from Hardware Type._name_ or something like this – ali Jul 11 '17 at 14:46
  • You can add fields to taxonomy terms too :) – Neograph734 Jul 11 '17 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.