0

My content has a field called release year . I want to be able to make a searchable view which will show only the unique years in this release date as options as a select . I don't want to hard code the years or have the user have to type in the year. How can I do this in a view?

1 Answer 1

0

I'm pretty sure Drupal 8 does this out of the box when you expose the field as a view filter. The drupal 8 documentation for Views and it's Filters is clear on how to set this up and I believe a Select list is possible with if your field is an integer or a date limited to a Year component.

https://www.drupal.org/docs/8/core/modules/views/expose-a-filter-to-site-visitors

Your Answer

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

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