Support » Plugin: Contact Form 7 Signature Addon » Validation Required Issues

  • I am having an issue on using the Signature Addon. When I submit my form I get a validation error for the required signature and then if I just hit submit again it submits fine.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter scottzozer

    (@scottzozer)

    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.
    Thread Starter scottzozer

    (@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.

    Thread Starter scottzozer

    (@scottzozer)

    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 );
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.