Opened 18 years ago
Closed 16 years ago
#6553 closed (duplicate)
Form Errorlist UL displays field.name instead of field.label
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Forms | Version: | dev |
| Severity: | Keywords: | form fields errors errorlist label | |
| Cc: | James Bennett | Triage Stage: | Accepted |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
When one wants to display all form errors together on a page with i.e. {{ myform.errors }} the fields' name is shown together with the error.
<ul class="errorlist">
<li>fieldNAME e.g. "user_email"
<ul class="errorlist">
<li>field error</li>
</ul>
</li>
</ul>
Mostly though, one would want to display the fields' label:
<ul class="errorlist">
<li>field LABEL: e.g. "Your e-mail:"
<ul class="errorlist">
<li>field error</li>
</ul>
</li>
</ul>
One 'fix' is to manually 'super' the ful_clean() method on a Form class, but this seems awkward. I cannot think of a situation where I would prefer the field.name in the presentation of form errors.
Should the full_clean() method of the BaseForm class be fixed to display the fields' label?
Change History (3)
comment:1 by , 18 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 18 years ago
| Cc: | added |
|---|
Is this a duplicate of #6705, which was marked invalid?