Search fields not included in generated query
Hi,
I'm having an issue with Low Search.
With the following code, only child_cosa_incolla are used in the query generated.
For example, query generated with that code is
"child:cosa_incolla_relationship=cemento-massetto|mattoni&require_all=child:cosa_incolla_relationship". No way to use checkboxes ("specifiche").
Can you help me?
Thanks,
Diego
{exp:low_search:form query="{segment_3}" result_page="trova-prodotto/risultati"}
--
{exp:channel:entries channel="materiali_incollaggio" dynamic="no"}
{title}
{/exp:channel:entries}
--
{exp:channel:entries channel="materiali_incollaggio" dynamic="no"}
{title}
{/exp:channel:entries}
{exp:low_options:specifiche}
{options}
{option:value}
{/options}
{/exp:low_options:specifiche}
Go
{/exp:low_search:form}
Thanks,
Diego
Replies
Low 6 Apr 2018 14:45
I'm afraid GetSat strips away most HTML, so try again. You can use http://pastie.org/ or http://pastebin.com/ for large chunks of code.
Diego - Oltremedia s.a.s. 6 Apr 2018 14:50
Oh, damn. I'm really sorry.
https://pastebin.com/tfWaUstu
It's ok now.
Thanks.
Low 6 Apr 2018 15:01
The value="" parameter of that other checkbox is empty, so therefore it won't be part of the query. You need to fill it with the appropriate value.
Also, the conditional you're using is
...wich will not work for several reasons. Try this instead:
Diego - Oltremedia s.a.s. 6 Apr 2018 15:46
It's working now, thanks!
How can I require *all* flagged checkboxes?
https://pastebin.com/UmC8aA19 seems working, is that enough?
The behaviour I want is that if I flag three checkboxes, two of them flagged in the backend/edit entry and one not, Low Search must not return me that entry.
Thanks for your help!
Low 7 Apr 2018 07:02
yes, that input field would work. You can also hard-code that parameter on the Results tag, eg. require_all="search:specifiche"
Add multiple parameter names in a pipe-separated list, eg: require_all="search:specifiche|child:cosa_incolla_relationship"
Diego - Oltremedia s.a.s. 9 Apr 2018 08:01
Thanks, it's working :)
Bye, have a good day.