Back to Captcha Support

penna20166
penna20166

The documentation states that we should capture the 'ajaxErrorMessage' global event if we want to run any custom code in case of a failed captcha validation. So I followed @daftspunk's recommendation on how to do this and did the following:

    $(window).on('ajaxErrorMessage', function(event, message){

        // This can be any custom JavaScript you want
        alert('Something bad happened, mate, here it is: ' + message);

        // This will stop the default alert() message
        event.preventDefault();

    })

But both event and message are coming out as "undefined". Any help in how we could get hold of the actual error object or its contents would be appreciated.

1-1 of 1