Answered
05 Jan 2024
Link to this post
Answering my own question.
Put the captcha in a content block
<div class="g-recaptcha" data-sitekey="myrecap key"></div>
Added this script to run on pre-validate.
$(document).on("tpc:pre-validate", function (event, form, sender) {
if (grecaptcha.getResponse() !== '') {
// recaptcha valid
} else {
event.message = "reCaptcha not valid.";
return false;
}
});