Ecommerce Shopify WordPress Discussion

How to verify user response using reCaptcha V3 on a custom HTML form in WordPress?

I am working a site and the client wanted to add some Eloqua HTML forms into the site. I want to add reCaptcha to these forms as the client was concerned about spam. I have looked at the v3 google documentation and looked at countless guides and videos and I am still stumped. I am still relatively new to custom PHP for Wordpress implementations, so I am learning as I go. So far I have managed to hook the form up to a JS function, which then does an AJAX request on the server with the token. The AJAX request runs a function on the server which calls the reCaptcha API. I have verified the token and if its a human, it returns true. If true, the function on the client side submits the form. I thought this was correct, but I am having doubts as I believe the submission should be done on the server side rather than back on the client side. But the form action is an Eloqua function e.g. and all the guides I have seen seem to just send an email. The reCaptcha seems to work, but I have a feeling the form still may get spammed. Also I have looked at plugins but all the ones I looked at seemed to be implementations for CF7, not for use on custom HTML forms. Any help would be greatly appreciated!
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.