Skip to content

Wrong form submitted when multiple captcha used on same page #55

Description

@gurucomkz

When 2 forms on a page both with invisible captcha, I see that only one of them is submitted regardless of which form I actually fill in. I.e. I fill in form 1 but form 2 is being submitted to the server. Found that var form is not retained for window['Nocaptcha-'+_noCaptchaFields[i]].

For a workaround, had to use another wrapper function to ensure the form var keeps its value.

window['Nocaptcha-'+_noCaptchaFields[i]]=(function(form){
    return function(token) {
        return new Promise(function(resolve, reject) {
            if(typeof jQuery!='undefined' && typeof jQuery.fn.validate!='undefined' && superHandler) {
                superHandler(form);
            }else {
                form.submit();
            }
            
            resolve();
        });
    }
})(form);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions