• Hi team. I hope you’re well.

    The module is working great and I love the fact I can have multi-select custom fields in my search forms.

    It’s a bit of a long shot, but do you know if there is any way I can implement an “OK” button when I’ve finished selecting values? Some users I’ve tested the module on say they are a little confused as to what to do next, especially on mobile (as by design, the multi-select does not close on selection as in single select).

    Something like SumoSelect:

    https://hemantnegi.github.io/jquery.sumoselect/sumoselect_demo.html

    (Scroll down to testselect7)

    Many thanks in advance, as usual.

Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    hmm currently this will be a bit difficult to do, the multi-select dropdown is generated using JavaScript, so to include “ok” or “cancel” buttons there, you would need to open wpadverts/assets/js/wpadverts-multiselect.js file and add there code which would add the buttons somewhere.

    You can also deregister the wpadverts-multiselect script and register your own with the code below, but note it will be best if your custom script will be built upon the original one or in very least please make sure it will be submitting the data the same way the original script does.

    
    add_action( "init", function() {
        wp_deregister_script( 'adverts-multiselect' );
        wp_register_script( 
            'adverts-multiselect', 
            '/your/full/path/to/the/script.here.js', 
            array( 'jquery' ), 
            "1.3.5", 
            true
        );
    }, 200 );
    
Viewing 1 replies (of 1 total)
  • The topic ‘“OK” button for multi-select input’ is closed to new replies.