Oct 10th, 2017, 6:14 PM
You can uncomment the logging error line with the $challenge variable and see what it's sending with nothing clicked.
My customer eventually wanted to not have it processed unless it was clicked so I put this code in the header of the same page using the validation script provided through formtools. This takes care of the same problem from another direction.
<script type="text/javascript" src="http://archival.com/formtools/global/scripts/rsv.js"></script>
<script type="text/javascript">
var rules = [];
rules.push("required,first_name,Please enter your first name.");
rules.push("required,last_name,Please enter your last name.");
rules.push("required,email,Please enter your email address.");
rules.push("valid_email,email,Please enter a valid email address.");
rules.push("required,city,Please enter your city.");
rules.push("required,state,Please enter your state.");
rules.push("required,zip,Please enter your ZIP.");
rules.push("required,g-recaptcha-response,Please fill out the Recaptcha.");
rules.push("required,address,Please enter your address.");
// *IMPORTANT!* these lines are required if you're using the rsv.js file that's bundled
// with Form Tools. They reset the custom options used throughout the main Form Tools
// script that won't be needed for your own forms
rsv.errorFieldClass = null;
rsv.displayType = "alert-all";
rsv.customErrorHandler = null;
</script>
My customer eventually wanted to not have it processed unless it was clicked so I put this code in the header of the same page using the validation script provided through formtools. This takes care of the same problem from another direction.
<script type="text/javascript" src="http://archival.com/formtools/global/scripts/rsv.js"></script>
<script type="text/javascript">
var rules = [];
rules.push("required,first_name,Please enter your first name.");
rules.push("required,last_name,Please enter your last name.");
rules.push("required,email,Please enter your email address.");
rules.push("valid_email,email,Please enter a valid email address.");
rules.push("required,city,Please enter your city.");
rules.push("required,state,Please enter your state.");
rules.push("required,zip,Please enter your ZIP.");
rules.push("required,g-recaptcha-response,Please fill out the Recaptcha.");
rules.push("required,address,Please enter your address.");
// *IMPORTANT!* these lines are required if you're using the rsv.js file that's bundled
// with Form Tools. They reset the custom options used throughout the main Form Tools
// script that won't be needed for your own forms
rsv.errorFieldClass = null;
rsv.displayType = "alert-all";
rsv.customErrorHandler = null;
</script>