"form.label_for tag" should apply "label_suffix"
|Reported by:||David Piccione <run4yourlives@…>||Owned by:||nobody|
|Cc:||ivanov.maxim@…, django@…, wagnerluis1982@…, spinyol||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||yes||Patch needs improvement:||no|
When using newforms, the default behavior is is to render a colon within each label entity. This can of course be overridden by using the "label_suffix" option on form creation.
However, "label_tag" is not consistent with this behavior, and in addition does not respond to the "label_suffix" option at all.
>>> print given_field.label_tag <label for="id_test">Label Name</label> >>> new_form = TestForm(label_suffix='|') >> print new_form.given_field.label_tag <label for="id_test">Label Name</label>
The label_tag method should obey the "label_suffix" option as is consistent with other form rendering techniques that print labels.
Change History (13)
comment:1 Changed 6 years ago by programmerq
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
Changed 6 years ago by redbaron
comment:5 Changed 4 years ago by lrekucki
- Has patch set
- Needs documentation set
- Needs tests set
- Triage Stage changed from Accepted to Design decision needed