I am working on a client site and they have a search form which we are using Low Search for. Two current search fields for keywords
and topics
(a Playa field) work fine.
I am working on the third field where we need to filter by the position
(text input) field of a related employee (Playa field).
Here is the code I currently have:
<select id="position" name="child:news_related_employees[]">
<option value="">All</option>
{exp:query sql="SELECT GROUP_CONCAT(entry_id) AS entry_ids, field_id_34 AS p_position FROM exp_channel_data WHERE field_id_34 != '' GROUP BY field_id_34 ORDER BY field_id_34 ASC"}
<option value="{entry_ids}">{p_position}</option>
{/exp:query}
</select>
The query works fine, I get a comma separated list of entry_id
s per unique position, however the form does not return any results. I assume that's because it is trying to match the entire string of entry_id
s to an employee in the Playa field.
Can anyone shed some light on this or know of a way to do what we need? Thanks.