Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3686 closed (duplicate)

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

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

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@… 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by ramzes@…

comment:1 Changed 8 years ago by ubernostrum

  • Needs documentation set
  • Needs tests unset
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 8 years ago by Gary Wilson <gary.wilson@…>

  • Summary changed from [patch] Set class name to "required" for labels which corresponds to required fields to Set 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 Changed 8 years ago by SmileyChris

  • Needs tests set
  • Resolution set to duplicate
  • Status changed from new to closed

#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 Changed 8 years ago by Gabriel Farrell <gsf@…>

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