Stumped
Usage seemed straightforward enough, but I'm failing to understand how to use Low Search. Here's my search form. The first search field, a Playa field, works perfectly; I get the expected results. The second field, artwork_sales_type, a dropdown field (didn't work as a radio field either) doesn't do anything. The selected item doesn't stay selected (after clicking Search the drop-down menu reverts to Any, not staying, say, Print Shop) and the search results aren't altered. The artwork_sales_type is set to searchable.
{exp:low_search:form query="{segment_3}" result_page="mss/sales"}
Artist
Any
{exp:channel:entries channel="artist"}
{exp:strip_line_breaks}{exp:tagstripper:stripAllTags}{artist_info}{last}, {given}{/artist_info}{/exp:tagstripper:stripAllTags}{/exp:strip_line_breaks}
{/exp:channel:entries}
Sales Type
Any
Commission
Consignment
Print Shop
Search
{/exp:low_search:form}
Here's the results part:
{exp:low_search:results query="{segment_3}"}
{exp:ce_img:pair src="{artwork_gallery}{image}{/artwork_gallery}" width="150" height="120" crop="yes"}
{/exp:ce_img:pair}
{if no_results}No search results{/if}
{/exp:low_search:results}
I must be misunderstanding something pretty fundamental.
Replies
Richard 2 Nov 2012 19:23
Ack! Sorry. The code I pasted into my post rendered in an unexpected useless way (obviously). I'll try to correct it later. I have to run right now. Again, sorry about that.
Richard 2 Nov 2012 19:25
Here's the code before I run off for a bit (hope it shows up properly):
Low 2 Nov 2012 19:41
Sinds you aren't using a keyword search, but you're targeting a specific field, do what you'd do in a native channel:entries tag: use the search:field="" parameter.
To use that in the Low Search form, simply use the input/select name="search:field".
So, in your case:
As values, use anything you'd use in the channel:entries tag parameter. You can use {low_search_search:artwork_sales_type} in conditionals to remember the selection.
Richard 2 Nov 2012 20:42
Yowza! That worked! Thanks for the very fast reply.