Opened 17 years ago

Closed 15 years ago

#6553 closed (duplicate)

Form Errorlist UL displays field.name instead of field.label

Reported by: dave@… 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 anonymous, 17 years ago

Triage Stage: UnreviewedAccepted

comment:2 by John DeRosa, 17 years ago

Cc: James Bennett added

Is this a duplicate of #6705, which was marked invalid?

comment:3 by anonymous, 15 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #6705

Note: See TracTickets for help on using tickets.
Back to Top