Forums Forums Search & Filter Pro Range inputs and auto submit form

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #266453

    Hello,

    when you have the auto submit form enabled, then all the input filters trigger an auto-submit after some time has passed after the user stops typing; this obviously can cause problems for slow-typers.

    I believe the most sensible thing to do would be in case of input filters to have a manual form submit – either by just hitting enter or by having an additional button to force the form submission.

    I don’t know if this is planned for the upcoming version – because, most of the things I asked for are more-or-less planned for the next release – but, in the meantime, how can you prevent the form from auto-submission for the input fields?

    Anonymous
    #266454

    Actually, I found my solution to my own problem and thought I should share..

    I searched this forum and found this:
    https://support.searchandfilter.com/forums/topic/prevent-range-number-from-auto-submit/page/2/

    So, This is what I did in the latest version.

    At #2818 I replaced this:

    $this.on('input', 'input[type="number"]', function(e) {
      self.inputUpdate(800);
    });

    With this:

    $this.on('keyup', 'input[type="number"]', function(e) {
      if(e.which == 13) {
        self.inputUpdate(200);
      }
    });

    Now, you have to hit enter to auto-update the form.

    Anonymous
    #266456

    Actually I ended up combining my solution with the one in the link I added… so essentially the form auto submits either when you hit enter OR focus out.

    Trevor
    #266491

    Thanks for sharing. I will close this thread for now.

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