Add reCAPTCHA validation and prevent form submission when invalid

[MAILPOET-6182]
This commit is contained in:
 Ján Mikláš
2024-08-06 23:27:48 +02:00
committed by Aschepikov
parent b7a6f0bea1
commit ccc1786614
2 changed files with 21 additions and 0 deletions

View File

@@ -114,6 +114,9 @@ class Renderer {
</noscript>
<input class="mailpoet_recaptcha_field" type="hidden" name="recaptchaWidgetId">
</div>';
if ($size !== 'invisible') {
$html .= '<div class="parsley-errors-list parsley-required mailpoet_error_recaptcha">' . __('This field is required.', 'mailpoet') . '</div>';
}
return $html;
}