Opened 13 years ago

Closed 13 years ago

#11301 closed (fixed)

Fields using SplitHiddenDateTimeWidget are still rendered with their label

Reported by: David Gouldin Owned by: nobody
Component: Forms Version: 1.0
Severity: Keywords:
Cc: dgouldin@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Using the following form class:

from django import forms
class TestForm(forms.Form):
    test_field = forms.SplitDateTimeField(widget=forms.widgets.SplitHiddenDateTimeWidget)

an instance of this class will render with a label for test_field:

>>> f = TestForm()
>>> f.as_table()
u'<tr><th><label for="id_test_field_0">Test field:</label></th><td><input type="hidden" name="test_field_0" id="id_test_field_0" /><input type="hidden" name="test_field_1" id="id_test_field_1" /></td></tr>'

Attachments (2)

11301.diff (509 bytes) - added by David Gouldin 13 years ago.
hide_label_splitdatetimefield.diff (1.2 KB) - added by punteney 13 years ago.
updated patch with test case

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by David Gouldin

Attachment: 11301.diff added

comment:1 Changed 13 years ago by David Gouldin

Cc: dgouldin@… added
Has patch: set

comment:2 Changed 13 years ago by Chris Beaven

Needs tests: set
Triage Stage: UnreviewedAccepted

Changed 13 years ago by punteney

updated patch with test case

comment:3 Changed 13 years ago by punteney

Needs tests: unset

updated patch with a test case

comment:4 Changed 13 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(In [12152]) Fixed #11301 - Properly hide SplitHiddenDateTimeWidget. Thanks to David Gouldin for the patch.

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