Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#3686 closed (duplicate)

Set class name to "required" for labels which corresponds to required fields

Reported by: ramzes@… Owned by: Adrian Holovaty
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

I need some way to mark required field in html code returned by form.as_...() . The proposal is to set class name as "required" for labels of that fields.

Attachments (1)

required_label.diff (2.1 KB ) - added by ramzes@… 18 years ago.

Download all attachments as: .zip

Change History (5)

by ramzes@…, 18 years ago

Attachment: required_label.diff added

comment:1 by James Bennett, 18 years ago

Needs documentation: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

I'd actually feel happier about having this passed automatically to the widgets, regardless of whether one of the as methods is being used; that way it works everywhere. Also, documentation which mentions that this will happen would be nice :)

comment:2 by Gary Wilson <gary.wilson@…>, 18 years ago

Summary: [patch] Set class name to "required" for labels which corresponds to required fieldsSet class name to "required" for labels which corresponds to required fields

#3898 marked as a duplicate.

See also #3512 which has a patch for adding classes to the container elements in the as_* methods instead.

comment:3 by Chris Beaven, 18 years ago

Needs tests: set
Resolution: duplicate
Status: newclosed

#3898 wasn't a duplicate, but #3515 is. I'll close this one and reference it there.

Hrm... and since ubernostrum is pro this method, I'll reopen #3515.

comment:4 by Gabriel Farrell <gsf@…>, 17 years ago

After a good amount of searching for a simple way to highlight required fields in my as_* form, I found this patch. It's exactly what I need, and much more specific than #3515. I'd much rather get this guy into trunk than all of the earth-moving going on at #3515. Any chance we could reopen?

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