I have a contact form that I manage to make work.
The form has some fields, the reCaptcha and a consent check box.
The PHP code is like this:
if