Custom submit button not saving search fields from different page

Forums › Forums › Search & Filter Pro › Custom submit button not saving search fields from different page

Tagged: , ,

Viewing 6 posts – 1 through 6 (of 6 total)
  • Anonymous
    #100338

    Hi,

    I’ve got a search form on a homepage which re directs to the results page and then runs the ajax search using the setting ‘Only use AJAX on results page’.

    I’ve used a custom search button to fire the search from the homepage but the fields aren’t being saved in the results page and instead go back to the default.

    I thought this would do this the trick but it’s not working…

    <script>
    document.getElementById("submit-form").addEventListener("click", function () {
       $('.searchandfilter').submit()
    });
    </script>
    Trevor
    #100389

    You have a search form on the page, but the submit button is elsewhere on the page (not in the form)?

    If so, all need do as in this post:

    https://support.searchandfilter.com/forums/topic/submit-form-from-external-button/#post-81103

    Anonymous
    #100414
    This reply has been marked as private.
    Trevor
    #100474
    This reply has been marked as private.
    Anonymous
    #100596
    This reply has been marked as private.
    Trevor
    #100678
    This reply has been marked as private.
Viewing 6 posts – 1 through 6 (of 6 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.