I've been wrestling with this for too long and it's doing my head in now!
I am using the low search plugin for expressionengine and want to search: a) by keyword (which is working fine) b) by channel - selected by dropdown (which I can't get to work)
So the results would show channel entries with the relevant keywords ONLY in the selected channel.
Currently I have:
{exp:low_search:form
form_class="header-search"
form_id="search-keywords"
required="keywords"
result_page="search/results"
}
<select name="searchChannel">
<option value="channel1|channel2">All</option>
<option value="channel1">Channel1</option>
<option value="channel2">Channel2</option>
</select>
<input type="text" name="keywords"id="keywords">
<input type="submit">
{/exp:low_search:form}
results page:
{exp:low_search:results
disable="{gv:disable_default}"
limit="18"
orderby_sort="title|asc"
query="{segment_3}"
}
I can pass through the searchChannel field through to the results page by adding:
{low_search_searchChannel}
to the results page; and of course I can set the channel filter in the results page by hard coding it:
channel="channel1"
but if I try:
channel="{low_search_searchChannel}"
I get nothing. There's probably a better way anyway to pass it straight in via the form tag, but have tried everything I can think of!
Thanks in advance