Thanks for much for this. I've attached an example of a page which works, however as I said if you take longer than 2 minutes or so to fill in the form it doesn't send the email to the client and doesn't log in the database. It does display the success message and send the confirmation email.
There's a thread here about the problem with the reCaptcha token expiring: https://stackoverflow.com/questions/51507695/google-recaptcha-v3-example-demo/60036326#60036326 - if you scroll down to the post that says:
"I am generating a google Recaptcha token at the client side at every 3 seconds of time interval because the token is valid for only a few minutes that's why if any user takes time to fill the form then it may be expired", it gives a working code example. I copied that as-is and it does work, but I I can't figure out how to integrate my existing code with it. Seems to me it should just be a case of adding something to the Javascript to force it to renew the token every 3 seconds but my Javascript knowledge isn't good enough!