Low Search and Radio Button Multiple Search
Dear All,
I need to create a simple search form with 2 radio buttons. the idea is to have an input field for the keyword and then 2 radio buttons for the "Articles" and "Authors". so the keywords need to be search in the selected radio button!
There is an "Articles" channel in my EE and there is a relationship field in the Articles channel linked to People channel.
So I am not sure how could I use the low search to achieve this! If you put a keyword and select Article radio button then results will be all articles with that keyword. And if you put a people name in keyword field and select "Authors" then it will results all articles that have the keyword in the related field.
Many thanks
Behzad
Replies
Low 1 Mar 2016 08:33
Normally, you would have the radiobuttons target different Collections, so one searches only Articles, the other People, eg:
However, instead of listing entries from the People channel, you want to display related entries: entries from the Articles channel that have certain child entries (the related People entry).
Right now, this is not possible with Low Search’s Keywords filter, as that will only return entries that match given search terms, regardless of relationships. So a match in the Articles channel will return the Articles entry, a match in the People channel will return a People entry.
However, you could work around this. Instead of directly returning related Articles when searching on People, you could list the People entries (eg. We found these authors: ...) and link to the list of articles belonging to the other in the search results, using the URL tag.
The results tag could look something like this:
...where rel_field_name is the name of the relationships field in the Articles channel that lets you select the author from the People channel.
Behzad Noroozi Fotoohieh 16 Mar 2016 17:25
Hi,
Many thanks for your reply and sorry for the delay to thank you.
I have done this but It seems something is not quite right.
this is my search form:
{exp:low_search:form result_page="publications/results" query="{segment_3}" search_mode"all"}
keywords
Title
Author
{/exp:low_search:form}
in the results page I get the articles correct. But when I put people name it does find the people but the related articles is :
Author: Derek Wood CBE QC View articles: http://falcon.searsdavies.co.uk/publi...
Would you please help if possible!
Thanks
Low 16 Mar 2016 20:47
So, for now, it's not possible to return related articles when searching on people.