V2 - Invisible not working in development mode #332
-
When trying to use the ReCaptchaV2Invisible widget with the test keys, I get the following result in the console::
|
Beta Was this translation helpful? Give feedback.
Replies: 11 comments
-
I get the same result when using real API keys. |
Beta Was this translation helpful? Give feedback.
-
@cpattersonit I had the same but I am using ajax form in modal window. To solve the issue I rewrote javascript code in the js_v2_invisible.html. If you submit form with js you have to change submit handler. |
Beta Was this translation helpful? Give feedback.
-
@dest81 That makes sense in that scenario. However, I am not using Ajax. It fails when I use a simple form with an HTML submit button. |
Beta Was this translation helpful? Give feedback.
-
Same problem here.
Getting the foloving in firefox:
ReCaptchaV2Checkbox works as excpected |
Beta Was this translation helpful? Give feedback.
-
Same happening here. Any fix??? |
Beta Was this translation helpful? Give feedback.
-
Make sure reCAPTCHA's type is v2 Invisible. Trying ReCaptchaV2Invisible with a reCAPTCHA of type v2 Checkbox, will lead to Also, please make sure you have added your development domain to the list of domains (e.g. if testing it from your localhost, then add localhost and 127.0.0.1 to the list of domains.) Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
@minyor - It looks like you may be having the same problem I was having earlier. In my case, the promise was hiding the true error - My input's name caused the conflict - changing I'm using django-crispy-forms, so I just needed to change from |
Beta Was this translation helpful? Give feedback.
-
For those of you using crispy forms, make sure that you aren't using crispy forms on the captcha field. I was using:
But updated it to:
With this in my form:
All-in-all a pretty straightforward fix to those experiencing issues and trying to use django-crispy-forms. |
Beta Was this translation helpful? Give feedback.
-
I have implemented
I know my reply is very abstract. Provide the code of your implementation for an exact answer. |
Beta Was this translation helpful? Give feedback.
-
I had a similar problem. Following @cspollar 's suggestion changed |
Beta Was this translation helpful? Give feedback.
-
I will move this to Discussions as it seems more of a "how to make this work" than "there’s something to fix in the package". Let me know if I got that wrong. |
Beta Was this translation helpful? Give feedback.
@minyor - It looks like you may be having the same problem I was having earlier. In my case, the promise was hiding the true error -
form.submit is not a function
.My input's name caused the conflict - changing
<input type="submit" name="submit" value="Submit">
to<input type="submit" name="submit_my_form" value="Submit">
resolved the error.I'm using django-crispy-forms, so I just needed to change from
Submit('submit', 'Submit')
toSubmit('submit_my_form', 'Submit')
.