You need to sign in to do that
Don't have an account?
ReCaptcha in Web To Lead
Hi All,
I am creating a web-to-lead form in wordpress site and added Invisible recaptcha in the code. But still I am getting the normal recaptcha with 'I am not robot' checkbox. Could you please help how to implement Invisible recaptcha in SF web to lead form.
Below are the sample code added to the exising web to lead form
</style>
<script src="https://www.google.com/recaptcha/api.js"></script>
<script>
function timestamp() { var response = document.getElementById("g-recaptcha-response"); if (response == null || response.value.trim() == "") {var elems = JSON.parse(document.getElementsByName("captcha_settings")[0].value);elems["ts"] = JSON.stringify(new Date().getTime());document.getElementsByName("captcha_settings")[0].value = JSON.stringify(elems); } } setInterval(timestamp, 500);
</script>
<script type="text/javascript">
<input type=hidden name='captcha_settings' value='{"keyname":"Invisible","fallback":"true","orgId":"00D..,"ts":""}'>
<div class="g-recaptcha" data-sitekey="6L...."></div><br>
Please help.
Another link I recommend to refer is - https://stackoverflow.com/questions/41079335/implement-the-new-invisible-recaptcha-from-google
All Answers
Hi Saravanan,
Kindly refer this below link :-
https://www.sfdcpoint.com/salesforce/salesforce-web-to-lead-form-with-recaptcha/
You might need to modify it accordingly.
If this solve your issue, please mark it as best answer.
Regards,
Priya Ranjan
Thank you Priya, for your quick response.
But I have refered the same link, while creating the reCaptcha with the "Invisible reCaptcha" option, still it is working same as normal option (with 'I am not robot' checkbox enabled). But ideally, user should not click the checkbox, it should be hidden or working in backend.
Another link I recommend to refer is - https://stackoverflow.com/questions/41079335/implement-the-new-invisible-recaptcha-from-google