Checkbox (label, field) ordering
|Reported by:||EoghanM||Owned by:||nobody|
|Severity:||Normal||Keywords:||label checkbox BooleanField|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
It is currently very difficult to reorder the default layout of fields:
<label for="x" ...>My Label:</label> <input id="x".../>
For checkboxes, this should be either:
<input id="x".../> <label for="x"...>My Label</label>
<label><input.../> My Label</label>
At the moment, in a template there's no way of knowing if a field is a BooleanField (in order to special case the html), and I don't know how I'd edit widgets etc. to override the current layout.
This has been touched on as a sore point elsewhere:
Where would be the best place to apply a patch for this?
- At the form level: as a new argument to forms/forms.py:_html_output, called 'checkbox_row' which for e.g. table rows would look like:
- At the field level: as a new boolean function 'is_checkbox'?
- Both of the above?
Change History (6)
comment:1 Changed 7 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Design decision needed|