All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Multiple search forms...

Paul Cripps 2 May 2014 15:13 question, complete

We have some pages of our site that contain two search forms

Both have slightly different functionally and both work fine as they have different ID's e.g. form_id="".

It all works very well until we forget to put in a keyword. If one of the forms DOES NOT contain a keyword BOTH forms report an error.

We're using the {if low_search_keywords_missing} tag to style and give warnings.

I'm guessing there isn't a way around this, any thoughts greatly appreciated.

Replies

  1. Low 2 May 2014 15:27

    I'm guessing keywords are required for both forms? if so, LS cannot see which form was submitted, so both will trigger the 'missing' conditional.

    You could try and add a hidden input field to each form, for example

    <input type="hidden" name="form" value="1">


    ...and value="2" for the other form. Then use {if low_search_form == 1}...{/if} to make sure the error is only triggered when that form is submitted.

  2. Paul Cripps 2 May 2014 15:29

    Genius, thank you, I'll give that a go.