blob: 54cc5a5980672f1c7230ef41a04af47c6217c4c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
from django import forms
class ContactForm(forms.Form):
name = forms.CharField(
label="Nombre",
required=True,
widget=forms.TextInput(
attrs={'placeholder': 'Nombre'}
),
min_length=3,
max_length=100)
email = forms.EmailField(
label="Email",
required=True,
widget=forms.EmailInput(
attrs={'placeholder': 'user@page.domain'}
),
min_length=3,
max_length=100)
content = forms.CharField(
label="Mensaje",
required=True,
widget=forms.Textarea(
attrs={'placeholder': 'Mensaje'}
),
min_length=10,
max_length=1000)
|