It looks like the signature base64 isnt added to the hidden field until after I hit submit the first time. Is there a control button I am missing that allows a user to save their signature or similar? right now it only shows a clear
button.
I have also removed all other CF7 plugins. Is there a known list of plugins that do not play well with your plugin?
-
This reply was modified 1 month, 1 week ago by
scottzozer.
I am thinking its a timing thing. It seems that the form checks validation quicker than your plugin moves the signature into the hidden field thus failing the validation of required field.
Currently what I am doing to work around this issue is the following
var doublecheckblocker = 0;
document.addEventListener( 'wpcf7invalid', function( event ) {
var inputs = event.detail.inputs;
var validation_errors = [];
if(inputs.length > 0) {
for (var i = 0; i < inputs.length; i++) {
if ('participant-signature' != inputs[i].name && inputs[i].value == "") {
validation_errors.push(inputs[i].name);
}
if ('participant-signature' == inputs[i].name && inputs[i].value == "") {
if (validation_errors.length < 1 && doublecheckblocker <= 1) {
++doublecheckblocker;
$('#consent-form').submit();
break;
}
if(doublecheckblocker >= 2){
doublecheckblocker = 0;
}
}
}
}
}, false );