To be honest, the captcha was made for sendForm method, since the captcha is usually part of the form. However, the send method can send any params, including the captcha token.
By the way, this is why the name of the parameter is so strange (g-recaptcha-response), this is the default name from reCAPCHA.
Ah is that right? I ended up using send as I wanted to show the reCaptcha after the form was submitted but before querying EmailJS.
Additionally, I wasn't able to find a guide to use reCaptcha with sendForm whereas I could find one for sendemailjs.com/docs/rest-api/send/. Looking again at the docs and your comment I guess that you literally just put the reCaptcha inside the form element and EmailJS will get it out of e.target.
To be honest, the captcha was made for
sendFormmethod, since the captcha is usually part of the form. However, thesendmethod can send any params, including the captcha token.By the way, this is why the name of the parameter is so strange (
g-recaptcha-response), this is the default name from reCAPCHA.Ah is that right? I ended up using
sendas I wanted to show the reCaptcha after the form was submitted but before querying EmailJS.Additionally, I wasn't able to find a guide to use reCaptcha with
sendFormwhereas I could find one forsendemailjs.com/docs/rest-api/send/. Looking again at the docs and your comment I guess that you literally just put the reCaptcha inside theformelement and EmailJS will get it out ofe.target.Yeah, you guess correctly.