All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Multiple search values including empty fields

Steven Lavine 10 Apr 2015 15:24 question, complete

I have a search field dropdown that filters the results as you would expect, however I require the field to return results matching the selected field value, and those where the field is empty. For example - We have a list of jobs, they are either nationwide (where the region field is empty) or set to a region. When you filter by region, currently only jobs for that region are displayed, when I would like these, and nationwide jobs to be displayed. I have tried the multiple values option but this does not appear to work

Replies

  1. Low 10 Apr 2015 16:06

    For empty values, assuming you're using the Field Search filter, use the native IS_EMPTY constant, eg:

    <input name="search:field" value="IS_EMPTY">