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

Support archive

Searching by multi-select custom fields.

John Leonardini 14 Mar 2014 16:45 question, complete

I'm making a search page for a job board, and am hung up on exactly how to get the search working. I've stripped down my template to just search by state, which is a multi-select field in EE. I've created a channel (jobs) with all of the necessary fields, and added the relevant fields to a collection (jobs). Here is my template for the search page and code for the search results entry:

http://pastie.org/8919371

The problem is, I always get "No Results Found." My search log has nothing under the keywords column, and "result_page: /resources/job-results" and "search:job_state: Alaska (AK)" under Parameters.

I feel like I'm missing something obvious, but this has stumped me for over a day. Any help would be greatly appreciated!

Replies

  1. Low 14 Mar 2014 19:16

    Okay, couple of things:

    1. Remove the collection= and search_mode= parameters from the Form tag; they don't do anything.

    2. Don't nest the Form tag inside the channel:entries tag, but rather use Low Options (free) to generate the select options.

    Also make sure the job_state field indeed has entries that contain the selected option. And check if entries are valid regarding entry/expiration dates -- just like the channel:entries tag, expired and future entries won't be returned by default.