Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Reset filters with javascript

Viewing 7 posts - 21 through 27 (of 27 total)
  • David GOURDET
    #239371
    This reply has been marked as private.
    Ross Moderator
    #239413

    Hi David

    So I’m not seeing what you are – my tests are behaving as expected…

    Can you try removing the last $('.searchandfilter').submit(); so we can see what happens, it should change the value, but no refresh of form or results.

    Also, can you remove the CSS that hides teh field, while we test?

    Thanks

    David GOURDET
    #239434

    Hi Ross,

    It’s done.

    Thanks !

    David

    PS : maybe I should comment this line $('.search-filter-results').empty(); too ?

    David GOURDET
    #239439
    This reply has been marked as private.
    Ross Moderator
    #239449

    Ahhh, I can see the issue I think…

    The issue is, once you make some selections in the other fields, the first deparment field is auto updated, and has maybe 1 option left (because its dynamic, and based on the other filters)….

    So when you set your select to the value you want with JS, the actual option within the select doesn’t even exist, so it effectively does nothing.

    What might work, is disabling “hide empty” option inside your department field, so they are always all shown.

    Let me know if that works!

    David GOURDET
    #239453

    Aaaaaah ! this was so easy and it makes total sense now !!
    why couldn’t I think about it ?? 🙂

    Thanks a lot Ross and sooooorry for the time lost !!!

    Have a great day,

    Best regards,

    David

    Ross Moderator
    #239506

    No worries, glad you got setup 🙂

    Best

Viewing 7 posts - 21 through 27 (of 27 total)

The topic ‘Reset filters with javascript’ is closed to new replies.