reCAPTCHA placeholder element must be an element or id (Quick Solution)
-
Hello,
We had an error in the reCAPTCHA field. It was not showing up after some updates of plugins and themes. These are the current versions we have:
Caldera Form Version -> 1.9.1
Caldera Anti Spam Version -> 0.3
Divis Theme Version -> 4.5.1The browser console gave this error:
Error: reCAPTCHA placeholder element must be an element or id
After some testing, we realized that the code to populate the Anti Spam reCAPTCHA field was called three times with different element IDs for each call. Only one of those IDs was in the DOM of the page. We made a quick fix by making sure the element indeed exist, validating the Element ID in fields.php file:
if(document.getElementById("cap<?php echo $field_id; ?>")){
We can provide the fields.php and if it is possible to use it for your base code for the plugin.
Thanks.
- The topic ‘reCAPTCHA placeholder element must be an element or id (Quick Solution)’ is closed to new replies.