feat: contact form and more edits
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
from django import forms
|
||||
|
||||
from .models import ContactSubmission
|
||||
|
||||
|
||||
class ContactForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = ContactSubmission
|
||||
fields = ["name", "title", "description", "email"]
|
||||
widgets = {
|
||||
"name": forms.TextInput(
|
||||
attrs={"placeholder": "Your full name", "autocomplete": "name"}
|
||||
),
|
||||
"title": forms.TextInput(attrs={"placeholder": "Subject / topic"}),
|
||||
"description": forms.Textarea(
|
||||
attrs={"placeholder": "Write your message here…", "rows": 5}
|
||||
),
|
||||
"email": forms.EmailInput(
|
||||
attrs={
|
||||
"placeholder": "your@email.com (optional)",
|
||||
"autocomplete": "email",
|
||||
}
|
||||
),
|
||||
}
|
||||
Reference in New Issue
Block a user