I've successfully followed the @SanfordWhiteman method for reCAPTCHA v3 - very thankful for that. Thank you!
We also use SendSafely for document upload, following their guidelines here. The widget.finalizePackage
method (API reference) is asynchronous. When trying to use both SendSafely and reCAPTCHA on a form (with the standard code from the links above), we've had trouble with either duplicate leads coming into Marketo, or duplicate form fills for the same lead.
I've tried refactoring the two blocks into one in multiple different ways to resolve the duplicates. The best success I've had is to stop the duplicate, but the reCAPTCHA 'Fingerprint' hasn't made it onto the form (even though it's logging in the console). I'm sure it's something to do with the two async functions resolving at different times, but I only know enough code to be a slightly helpful - not a developer.
Has anyone done something similar before that you could share advice, pseudo-code for how I should aiming to solve, or actual code that might help?
Solved! Go to Solution.
You must make sure each listener cooperates with previous and subsequent ones, i.e. don’t just set the form as submitable when the current listener thinks it’s submitable. As shown here:
You must make sure each listener cooperates with previous and subsequent ones, i.e. don’t just set the form as submitable when the current listener thinks it’s submitable. As shown here:
Makes a lot of sense, thanks for that. I think I was looking at it for too long without a break...