kthornbloom / slide-to-submit

A jQuery plugin for slide to submit forms
http://kthornbloom.com/slidetosubmit/
6 stars 5 forks source link

How to make this submit the form after sliding? #1

Open DJPVMA opened 3 weeks ago

DJPVMA commented 3 weeks ago

When I add this and slide to submit, it correctly verifies required form inputs, but when I slide to submit, there is no form action happening. How do I make this functional for my form? I was using a button to submit the form, but I have received far too much bot spam because of it and would like to use this button. Will you please help?

kthornbloom commented 3 weeks ago

Hey @DJPVMA - you can change the line: $('.slide-submit-delay').parents('form').find('input[type=submit]').click(); to $('.slide-submit-delay').parents('form').submit();

However, I should mention that this project is pretty old, I'm not sure how effective it will be. Other methods include things like adding an input with all the right values to make a bot fill it out, but hiding it visually from humans. If anything is entered in it, you know it was a bot and you can reject that submission.

DJPVMA commented 3 weeks ago

Nevermind, I figured out what was wrong. Thank you so much for your help! Awesome code!!!!

DJPVMA commented 3 weeks ago

Hi, I have one more question. How can I reset the slider if they entered the wrong captcha?

Please, see example at: https://djpvma.com/testing. The form is revealed by clicking the RSVP button.

DJPVMA commented 3 weeks ago

Okay, I have been working at this for a while and I am stuck. Will you please help me with this one last issue? I am trying to get the JS to check the captcha before submitting and providing the success text, but I am not very experienced with coding javascript or jquery, and I keep breaking the code. How could I successfully check the captcha before submitting the form and locking the sliding button at 100% and showing success text?