Snaptcha
ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6
Back to this add-on's main page
View Other Add-ons From Brian Litzinger
Resetting form on page load causes form submission to fail
Support (Resolved)
elsmore
|
Posted: 20 January 2016 11:20 AM |
|
|
|
I have an AJAX cost calculator Freeform form that I want to reset (clear) if a user hits the browser refresh button. Without the reset script the form works, but If I use the reset script it doesn’t submit (throws the Snaptcha error). Here’s the script:
$(document).ready(function () { resetForms(); }); function resetForms() { document.getElementById('configurator-form').reset(); }
If I reduce Snaptcha security level to low, the forms work again ok.
Any idea how I can fix this? The site is not live yet, so I’d need to provide a login if you need to see the form.
Snaptcha 1.7.6, EE 2.9.2
|
|
|
PutYourLightsOn
|
Posted: 20 January 2016 12:08 PM |
# 1
|
|
|
using the reset function will clear all fields in the form including the snaptcha field which is why the error is thrown. you’ll need to either manually reset the form fields or restore the snaptcha field value. make sense?
|
|
|
elsmore
|
Posted: 20 January 2016 12:59 PM |
# 2
|
|
|
Ok, makes perfect sense thank you!
|
|
|
PutYourLightsOn
|
Posted: 20 January 2016 01:01 PM |
# 3
|
|
|
great, glad to help!!
|
|
|