I just tried your code and it worked. Your initial controller code is correct, you need to read the answer from input. If it's empty, check if media/plg_captcha_recaptcha_v3/js/main.js script is loaded and check for JS errors in browser. I do find it strange that you're getting untranslated language constant. Plugin's language file is loaded right before constant is used so you should definitely see a translated string.
Unrelated to your issue, but you should explicitly check that checkAnswer() returns true. In case of failure it may throw an exception but it may also return false.
Unrelated to your issue, but you should explicitly check that checkAnswer() returns true. In case of failure it may throw an exception but it may also return false.
Statistics: Posted by SharkyKZ — Tue Feb 13, 2024 8:00 am