Not sure of the best way to progress with this but i'm trying to create an advanced search on a Craft site.
What it needs is a select dropdown for Authors, Categories and a normal text input. The search options can be stacked and used singularly.
I'm trying a couple of things which I'll post here if they work but any assistance would be grand.
Here is the basics to being with.
<form class="search" action="{{ url('news/results') }}">
<div class="col col-33">
<label>Category</label>
<div class="filter">
<select name="c">
{% set categories = craft.categories.find({ group: 'news' }) %}
{% for category in categories %}
<option>{{ category.title }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="col col-33">
<label>Keywords</label>
<input type="text" name="q">
</div>
<div class="col col-33">
<button type="submit" class="btn search">
Begin Search
</button>
</div>
</form>
And then on the "search results" page for example...
{% set query = craft.request.getParam('q', 'c') %}
{% set entries = craft.entries.search(query).order('score').section('news').limit(10) %}
{% if entries|length %}
{% for entry in entries %}
{% endfor %}
{% else %}
<p>Your search for “{{ query }}” didn’t return any results.</p>
{% endif %}
I know i'm probably missing something extremely obvious here as i'm sure it's fairly simple to achieve.