Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#4024 closed (duplicate)

Setting required=True in newforms Fields does not result in an change in as_p/as_ul/as_table

Reported by: Anders Conbere <aconbere@…> Owned by: Adrian Holovaty
Component: Forms Version: dev
Severity: Keywords: html_ouput as_p as_ul as_table required
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

While it's nice to be able to set "required=True" and have it validate that properly, there is no hint given to the ui about this. My primary concern in this case is the generated content from html_output and the as_* functions. What I propose is a css_classes list in html_output that can be appended to by other attributes that might be set in the future, and a classes label for string concatenation added to the normal_row definitions.

Attachments (1)

forms.py.diff (2.5 KB ) - added by Anders Conbere <aconbere@…> 17 years ago.
adds the ability to attach css classes to fields in generated output

Download all attachments as: .zip

Change History (6)

by Anders Conbere <aconbere@…>, 17 years ago

Attachment: forms.py.diff added

adds the ability to attach css classes to fields in generated output

comment:1 by Waylan Limberg <waylan@…>, 17 years ago

This should probably be marked as a duplicate of #3512

comment:2 by Waylan Limberg <waylan@…>, 17 years ago

Needs documentation: set
Needs tests: set

Whoops, didn't mean to change the status.

comment:3 by Anders Conbere <aconbere@…>, 17 years ago

Resolution: duplicate
Status: newclosed

comment:4 by Anders Conbere <aconbere@…>, 17 years ago

hmmm maybe I don't understand how trac works here, but that definitely did not set my ticket as a duplicate of a specified ticket.

comment:5 by Anders Conbere <aconbere@…>, 17 years ago

duplicate of #3512

(setting the ticket that this is a dup of in the message body is really backwards, and doesn't allow for particularly nice backlinking...shame on trac devs)

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