Answer the question
In order to leave comments, you need to log in
How to remove "Required field" from Django form?
Hello.
You need to create a form with a required field, but at the same time you need to remove the auxiliary text from the top of the form:
How can this be done?
The form itself:
class CreviewForm(forms.Form):
review = forms.CharField(widget=forms.Textarea, label='Ваш отзыв', required=True)
Answer the question
In order to leave comments, you need to log in
error_messages={'required': ''} add to field
cen = forms.CharField(label = "", error_messages={'required': ''})
it is also likely that when the form is displayed in the template, it is specified directly: {{ form.email.errors }} - it also displays
only the output of the field through {{ form.email }}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question