0

I've got an issue here where a low search via a select drop down is returning all results, and I am not sure why.

Here's the search form.

{exp:low_search:form result_page="{segment_1}/search" form_id="last_name_search" starts_with="search:Lastname"}
        <select name="search:Lastname" id="last_name">
            <option value="" selected>Initial Last Name</option>
            {exp:low_list:each items="A|Z" range="yes"}
                <option value="{val}">
                  {val}
                </option>
             {/exp:low_list:each}
        </select>
{/exp:low_search:form}

I need to search a members channel by querying against the first letter of their last name. To do this starts_with seemed to be the Field Search parameter that needed to be used. But, in the results tag, every member is being returned.

Here is the results tag.

{exp:low_search:results
        limit="20"
        paginate="bottom"
        query="{segment_3}"
        status="Members-id5|Staff-id7|Site_Admins-id6|Corporate-id8"}
    {!-- HTML stuffs --}
{/exp:low_search:results}

I checked {low_search_search:Lastname} and it does hold the correct lettered I want to query with, but it's not being applied to the results. What am I doing wrong here? Thanks for any help!

1 Answer 1

1

To quote the docs:

[P]arameters can be applied in two ways: as input fields in a Form, or as hard-coded parameters in the Results or URL tag.

That means the Form tag doesn't accept any filter parameters, like starts_with. So try moving that parameter to the Results tag instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.