Add function to Custom Field Reset Button

New home Forums Pro Add-on General queries Add function to Custom Field Reset Button

This topic contains 2 replies, has 2 voices, and was last updated by  Tomsen 1 month, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #52614

    Tomsen
    Member

    Hello everyone!

    On my site I’ve got the Category Filter and the Custom Field Filters next to each other and I’d like the reset button for the custom field filters to also reset the category filter. Is there an easy way to accomplish this?

    Thank you 🙂

    #52633

    Hi Tomsen,

    Thanks for getting in touch with us.

    This would be possible with some custom code and I would be more than happy to help.

    Could I kindly ask if you could please send me a link to your site with the map so that I can take a closer look and assist you further?

    Thanks.

    Best regards,
    Dylan

    #53032

    Tomsen
    Member

    Hi Dylan,

    Thank you for your quick reply and sorry for only getting back to you now. I am pretty sure I checked the forum a couple of times but never saw any replies to my post. Maybe it was just some issue with my browser cache. Weird. Anyway..

    http://trailrun.asia is my site.

    I guess you can see what I am trying to achieve. There are quite a few things I’d like to tweak/add, but with my limited knowledge of JS, I have just been trying to work around things through CSS styling or other amateurish tricks without touching the plugin itself.

    My main issues right now are:

    1) getting the reset button to work for all dropdown menus as in my first post

    2) setting the dropdown items in a specific order, as opposed to alphabetic order. (You can see what I did with the “date” field)

    Best regards,
    Tom

    #53096

    Hi Tom,

    Thank you for the response and letting me know.

    1. To make the reset button reset all fields, could I kindly ask you to please add the following JS under Maps > Advanced Settings > Custom JS:
    jQuery(document).ready(function(){
    jQuery(‘body’).on(‘click’, ‘.wpgmza-reset-custom-fields’, function(){
    jQuery(‘body’).find(‘#wpgmza_filter_select’).val(‘0’).trigger(‘change’);
    });
    });

    2. This will also be possible with some JavaScript, but could I kindly firstly ask in which order you would like them to be displayed or would you like to display the different dropdowns in different orders?

    Thanks for your time and I am looking forward to hearing back from you and assisting you further.

    Kindest regards,
    Dylan

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

You must be logged in to reply to this topic.