Advanced Search with Matrix Fields from two different custom fields from the same channel
How can I have an advanced search form with 5 select boxes. Four of these are matrix fields from one custom field and the last select box is another matrix field from another custom channel field. Both these custom channel fields belong to one channel.
Replies
Low 10 Nov 2013 13:10
You can't specifically target Matrix columns in Low Search 2. Instead, you'd have to target the field as a whole. Make sure the columns you're searching for are searchable in the Matrix field settings. Then use the search:field_name parameter to target the field. If you're targeting the same field multiple times, use square brackets in the field name. For the second Matrix field, use the same principle, but targeting it only once. So, something like this:
For the first field, that will search for any of the selected items. To search for all of the selected items, add require_all="search:matrix_field_1" to the Results tag.
Noor Mohammad 10 Nov 2013 21:31
What I meant was I had 4 matrix columns in one Matrix field and 1 column in another Matrix field.
I want to populate the dropdowns with the column data and then search based on that.
Is that possible?
Noor Mohammad 10 Nov 2013 22:30
How can I have results page to link correctly.
{comment_url_title_auto_path}
Where can I configure the template which will show the detailed page upon clicking the search result title.
Low 11 Nov 2013 08:11
Populating dropdowns for your search form is up to you. You'll probably have to resort to using EE's Query module for that, or hard-code it in your templates.
You can use the same variables and conditionals that you would use inside the channel:entries tag to generate URLs for search results. the {comment_url_title_auto_path} is set in the channel preferences: http://ellislab.com/expressionengine/...