• Resolved rich95

    (@rich95)


    Hi;

    I’m working with the Search & Filter plugin and it’s exactly what I needed! I would like to make my selections submit every time a dropdown is changed, as opposed to having to click the submit button.

    In researching other posts, I’ve found that the solution is to implement this into my theme’s java script file:

    $(“.searchandfilter select”).change(function() {
    $(“.searchandfilter”).submit();
    });

    I have put the line into my WooThemes Canvas’s ‘general.js’ file but it seems to make no difference. I still need to click on the submit button to make changes. I’ve tried placing it in various other js files but I’ve had no luck. The page in questions is this one:

    http://richardrosenman.com/wordpress/portfolio/

    Does anyone have any insight as to what I’m doing wrong?

    Thanks!

    https://wordpress.org/plugins/search-filter/

Viewing 4 replies - 1 through 4 (of 4 total)
  • in the file search-filter.php of the plugin. add this on line 1155 and then delete the SUBMIT inpug of the plugin:

    $returnvar .= "<script type='text/javascript'>
    jQuery(function($){
    $(document).ready(function () {
         $('#oflocations').on('change', function()
         {
             $('.searchandfilter').submit();
         });
     });
    });
    </script>";
    Plugin Author Ross Morsali

    (@designsandcode)

    Thanks for the code.

    In case anyone is reading this is also an option that has been added to the Pro plugin.

    Thanks

    bdd

    (@bws-online)

    @roycegracie: What did you mean when you said “delete the SUBMIT inpug of the plugin”?

    Also, I’d like to do this with checkboxes — have a list of post title links, then have them change based on checkbox selections. Is that possible with this (instead of using the dropdown)?

    Thanks.

    roycegracie

    (@roycegracie)

    i ment to delete the submit input. see at line 1153, you have this line:
    <input type="submit" value="'.$submitlabel.'">

    just delete it.

    regarding making the checkbox thing, i am sure it is possible but i didn’t need to do this so i don’t know how to at the moment.

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

The topic ‘Search & Filter Auto Submit’ is closed to new replies.