I want to modify the weight of the fields in UserCreationForm. How is that possible?
class SignUpForm(UserCreationForm):
username = forms.CharField( widget=forms.TextInput(attrs={
"class": "input",
"type": "text",
"placeholder": "Username",
}) )
email = forms.CharField(widget=forms.TextInput(attrs={
"class": "input",
"type": "email",
"placeholder": "Email"
}))
password1 = forms.CharField(widget=forms.TextInput(attrs={
"class": "input",
"type": "password",
"placeholder": "Password"
}))
password2 = forms.CharField(widget=forms.TextInput(attrs={
"class": "input",
"type": "password",
"placeholder": "Password"
}))
class Meta:
model= User
fields = [
"username", "email", "password1", "password2"
]
I want to modify the size of the fields: Username, Email, Password 1, and Password 2
More precisely, I want the fields longer. I would appreciate any help.