// Generate our FE reCAPTCHA token
if (tok_gen.reCaptchaTokenToggle === true) {
// Test that the method of calling a token is ready per Google's docs
var onloadCallback = function() {
grecaptcha.ready(function() {
// Execute the function to generate the token
grecaptcha
.execute(tok_gen.reCaptchaSiteKey, {
action: 'contactUs',
})
.then(function(token) {
// Set the securitycode value to the token.
tok_gen.recaptchaToken = token;
// $('#securitycode').val(token);
// Enable the abiltiy to submit the form.
$('#SubmitContactUsBtn').removeClass('disabled');
$('#SubmitContactUsBtn').removeAttr('disabled');
});
});
}
} else {
// To pass our automated tests,
// Enable the abiltiy to submit the form.
$('#SubmitContactUsBtn').removeClass('disabled');
$('#SubmitContactUsBtn').removeAttr('disabled');
}