• So I have two forms on my page. One to search for a product, one to search for a brand. But whenever I search either for a product or a brand, on the results page my two input fields gets populated by the search term I used.

    So let’s say I search for Laptop in the product field, the results page will show my the text input field for both Product and Brand with Laptop filled in, you get it?

    It’s because the forms probably have identical name (they are both called skeyword). Any ideas?

    https://ww.wp.xz.cn/plugins/ultimate-wp-query-search-filter/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TC.K

    (@wp_dummy)

    No, i don’t get it.
    Can you give me your site url?

    Thread Starter Everlast00

    (@everlast00)

    Hi!

    This is the site.

    You can see 2 forms.

    When you type something in “Zoek Schip”, and search with the button “Zoeken”, the next page will show the search results, but you will also see the “Zoek leverancier” input box populated with the search term.

    So you have 2 search boxes populated. That’s because the search input box has the same name=”” attribute. How do I fix this?

    Plugin Author TC.K

    (@wp_dummy)

    That’s the problem when using two form in one page. The name is essential so it is not a good practice to change it.
    The best option is not holding the search query in the form.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Two forms, same name?’ is closed to new replies.