new form with recaptcha
This commit is contained in:
@@ -18,6 +18,8 @@ from django.contrib.auth.forms import UserCreationForm
|
||||
from django.contrib.auth.models import User
|
||||
from django.contrib.admin.widgets import AdminDateWidget
|
||||
from django.forms.widgets import SelectDateWidget, HiddenInput
|
||||
from django_recaptcha.fields import ReCaptchaField
|
||||
from django_recaptcha.widgets import ReCaptchaV3
|
||||
|
||||
from django.utils import timezone, translation
|
||||
from django.forms import ModelForm, Select
|
||||
@@ -235,11 +237,12 @@ class SearchForm(forms.Form):
|
||||
|
||||
# simple form for Contact page. Sends email to info@rowsandall.com
|
||||
class EmailForm(forms.Form):
|
||||
firstname = forms.CharField(max_length=255)
|
||||
lastname = forms.CharField(max_length=255, required=False)
|
||||
firstname = forms.CharField(max_length=255, label="First Name")
|
||||
lastname = forms.CharField(max_length=255, required=False, label="Last Name")
|
||||
email = forms.EmailField()
|
||||
subject = forms.CharField(max_length=255)
|
||||
message = forms.CharField(widget=forms.Textarea())
|
||||
captcha = ReCaptchaField(widget=ReCaptchaV3)
|
||||
|
||||
|
||||
disqualificationreasons = (
|
||||
|
||||
Reference in New Issue
Block a user