Probably a poor question, but I\'m using Django\'s UserCreationForm (slightly modified to include email), and I would like to remove the help_text that Django automatically
You can set help_text
of fields to None in __init__
from django.contrib.auth.forms import UserCreationForm
from django import forms
class UserCreateForm(UserCreationForm):
email = forms.EmailField(required=True)
def __init__(self, *args, **kwargs):
super(UserCreateForm, self).__init__(*args, **kwargs)
for fieldname in ['username', 'password1', 'password2']:
self.fields[fieldname].help_text = None
print UserCreateForm()
output:
If you are doing too many changes, in such cases it is better to just override the fields e.g.
class UserCreateForm(UserCreationForm):
password2 = forms.CharField(label=_("Whatever"), widget=MyPasswordInput
but in your case my solution will work very well.