Forums Forums Search & Filter Pro align two search forms with executed search

Viewing 4 posts - 1 through 4 (of 4 total)
  • Ross Moderator
    #30176

    Hey Bram

    Are you using ajax? In this case I’m afraid not.

    What you would need to is write some jQuery code, to detect when

    .searchandfilter input[type=text] is updated, and when it is, copy the val of that to all other instances on the page.

    Alternatively, if you have bookmarkable URLs enabled, and Ajax disabled, then they will use the same URL variable to populate the search field.

    Thanks

    Anonymous
    #30177

    Hi Ross,

    Thanks for the fast reply.

    Yes, AJAX is what we need. Good to know I’m not overlooking something.
    And thanks for pointing in the right direction. I’ll see if I can get it to work that way.

    Have a nice day!

    Bram

    Anonymous
    #30322

    I came up with this little snippet that works quite good for now.

    $( "body" ).on( "change", ".searchandfilter input[type=text]", function() {
       $('.searchandfilter input[type=text]').val( $( this ).val() );
    });

    The ‘change’ event only fires on blur, but fortunately your plugin blurs the search field when submitting the form through ajax so that works well.

    Ross Moderator
    #30550

    Thanks for the update Bram!

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