Skip to content

Commit

Permalink
Update to ReCAPTCHAv3
Browse files Browse the repository at this point in the history
  • Loading branch information
trickeydan committed Feb 10, 2024
1 parent 8eef749 commit 46b33af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kmicms/pages/contact/forms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django import forms
from django_recaptcha.fields import ReCaptchaField
from django_recaptcha.widgets import ReCaptchaV3
from wagtail.contrib.forms.forms import FormBuilder


Expand All @@ -10,7 +11,7 @@ class ContactFormBuilder(FormBuilder):
def formfields(self) -> dict:
# Add wagtailcaptcha to formfields property
fields = super().formfields
fields[self.CAPTCHA_FIELD_NAME] = ReCaptchaField(label="")
fields[self.CAPTCHA_FIELD_NAME] = ReCaptchaField(widget=ReCaptchaV3)

return fields

Expand Down

0 comments on commit 46b33af

Please sign in to comment.