Reset button with multiple search forms sharing same ID

Forums › Forums › Search & Filter Pro › Reset button with multiple search forms sharing same ID

Tagged: 

Viewing 2 posts – 1 through 2 (of 2 total)
  • Anonymous
    #21319

    On my page I have multiple instances of the same search form. One in the main body and one in the sidebar. I show and hide fields with css so the main body and sidebar have different search fields. However, they have to be connected with each other (thats why they are sharing the same search ID form). Everything is working except the reset button. The reset button only resets the value of the first search form, not all search forms with same ID. Is there a way to accomplish this?

    Ross Moderator
    #21402

    Hey John

    This is not possible right now. IDs are only supposed to be used on one element at a time so this is likely part of the problem.

    The next version of S&f there is a bit of a JS rewrite, and you’ll be able to call functions on your form to build better custom functionality, something like:

    //this is not quite accurate but more of the general concept
    $('.searchandfilter').get(2).reset();

    Thanks

Viewing 2 posts – 1 through 2 (of 2 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.