Skip to content

Commit

Permalink
captcha häirintälomakkeeseen
Browse files Browse the repository at this point in the history
  • Loading branch information
elmanevala committed Jan 29, 2023
1 parent ef3648b commit e87da65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions palautteet/hairinta/forms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from django.forms.fields import CharField, BooleanField
from django.forms.widgets import Textarea, CheckboxInput, TextInput

from captcha.fields import ReCaptchaField

from ..forms import ContactsForm


Expand All @@ -25,7 +27,11 @@ class Media:
required=False
)

captcha = ReCaptchaField()

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields.get('email').widget = TextInput(attrs=dict(style='display: none'))
self.fields.get('name').widget = TextInput(attrs=dict(style='display: none'))


0 comments on commit e87da65

Please sign in to comment.