1

Is it possible to have a single Low Search form doing something like:

Low Search Form field called name which checks for values in channel fields called company_name, first_name, last_name Low Search Form field called keywords which works just like the regular keywords field on Low Search

I know we could have three fields on the form to handle company name, first name, last name but we are trying to simplify it for users and just have one field called name.

1

If you want to search multiple fields with one input field, you'll need to use the Keywords filter. The Field Search filter will always target a single field. Therefore, if you want to search for name only across 3 different fields, you'd need to create a collection where you give weight to the company_name, first_name and last_name fields only. You could use a <select> or radio buttons to let the user select the collection to use. For example:

Search for <input type="search" name="keywords">
in <select name="collection">
    <option value="">the whole site</option>
    <option value="names">names</option>
</select>
<button type="submit">Go</button>

...where names is the collection for the name only. By leaving the collection parameter empty, you're telling Low Search to search all collections.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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