Opened 10 years ago

Closed 10 years ago

Last modified 10 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: master
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: UI/UX:

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@…> 10 years ago.
adds the ability to attach css classes to fields in generated output

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by Anders Conbere <aconbere@…>

Attachment: forms.py.diff added

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

comment:1 Changed 10 years ago by Waylan Limberg <waylan@…>

This should probably be marked as a duplicate of #3512

comment:2 Changed 10 years ago by Waylan Limberg <waylan@…>

Needs documentation: set
Needs tests: set

Whoops, didn't mean to change the status.

comment:3 Changed 10 years ago by Anders Conbere <aconbere@…>

Resolution: duplicate
Status: newclosed

comment:4 Changed 10 years ago by Anders Conbere <aconbere@…>

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 Changed 10 years ago by Anders Conbere <aconbere@…>

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