Forums Forums Search & Filter Pro Auto submit for custom SELECT styling

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #258330

    Hi,
    I’m using a custom styling for the select elements (hiding the actual select and generating a custom layout which changes the selected value of the original select form field).

    How can I initialize the form correctly to then submit it. Only running “submit()” on the form doesn’t work.

    Best,
    Marc

    Anonymous
    #258334

    It seems to be working with jQuery’s .change(), like:
    jQuery('.sf-input-select').change();

    Trevor
    #258404

    I would normally recommend using Select2 to do that sort of thing (as it is the most commonly used script for WordPress). I can refer you to a post on how to do that. Our form supports Select2 natively (the easiest way is to make a dropdown box a combobox, but there is an alternate method to do it without setting them as comboboxes).

    To submit the form you would use:

    $('.searchandfilter').submit()

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