I have dealt with only ModelForm previously, so it is my first time using Form. I'd like to get rid of labels from my form, however, how I get rid of labels in ModelForm does not seem to work with Form.
Here is my code:
forms.py
class UserLoginForm(forms.Form):
email = forms.CharField(max_length=255)
password = forms.CharField(max_length=255)
labels = {
'email': '',
'password': ''
}
widgets = {
'email': forms.TextInput(attrs={'class': 'login_input', 'placeholder': 'Email'}),
'password': forms.PasswordInput(attrs={'class': 'login_input', 'placeholder': 'Password'})
}
It seemed like a simple problem but it turned out I could not get what I wanted from the official django document or Google. I'd be really appreciated if you could help me solving it.