Forums Forums Search & Filter Pro Disable "auto submit" function in one or more specific pages of the site.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #222268

    Hi, I would like to know if it is possible to disable the “auto submit” function in one or more specific pages of the site.

    I try to explain better. I am currently using a specific page for search results, in which the “Search Form Shortcode” and the “Results Shortcode” are present.

    At the moment, I configured the “Search Form Shortcode” with the “ajax auto submit” function activated. However, I would need to use the same “Search Form Shortcode”, also in the other pages of my site (in particular in the sidebar), but without the “auto submit” function and using the manual submit button instead.

    As for me, it is not very user-friendly to use a Form with the “auto submit” function active on the other pages of the site, because there is not enough time to set the filters before the “auto submit” function redirects to the page set for the “Results Shortcode”.
     
    Is it possible therefore to activate or deactivate the “auto submit” function of ajax only in specific pages of the site, for the same Form?

    I hope I explained the problem well and you can help me, thanks.

    Regards
    Alberto

    Trevor
    #222312

    You would need two forms, the same setup but for the autosubmit. Two separate shortcode results method forms can point to one results page with the results shortcode from with form. as long as the field names used match, it should work.

    Anonymous
    #222357

    Hi Trevor, thank you very much for your support. Your idea is quite valid but not suited to my needs. In my site, I manage hundreds of product categories and I need to make a different form for each product category. With your suggestion, I should therefore make two forms for each product category and this is not feasible.

    I still solved this way, adding some futures:

    1) I deactivated the “auto submit” function, activating it only for the “order sort” module through a few lines of javascript. This is what I was most interested in doing.

    2) I activated automatic scrolling to search results through a custom selector. Through some lines of javascript code then (which I found in another topic), I activated automatic scrolling when the search comes from another page (because this does not happen by default).
     
    3) Through some css rules, I managed to move the “order sort” module just above the search results, because I created a layout in which the form is present in the left sidebar, while the search results are present in the right part of the page.

    I hope that with the next updates there will be the possibility to divide the form modules individually, in order to better position them in other points of the page or even in other pages. I tried to do it but I didn’t succeed …… In the meantime I had to use the css.

    I also hope that implementing the possibility of being able to select different fields in the same form, based on the chosen category (or in any case based on the choice of a specific field).

    Hi Trevor, you can close the topic and see you next time 😉

    Trevor
    #222367

    Your points are noted. You might have been able to use just two forms for all products, where you have all fields on the forms that are needed, and then use custom CSS to hide certain fields on certain pages (each product category page has its own unique class name in the body tag.

    I will close this thread for now.

Viewing 4 posts - 1 through 4 (of 4 total)