newforms: add readonly support to widgets
|Reported by:||anonymous||Owned by:||adrian|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
readonly= is an integral part of some Intranet applications and is currently lacking from newforms. The documentation should probably state that, of course, if you really want something to be readonly, you cannot put it in a form at all, but for the rest of us, readonly is an easy solution.
The only problems are that select fields don't have a readonly= property. I've seen them rendered as <input type="text" /> instead, or you can use <select disabled=disabled" /> and automatically append an <input type="hidden" /> with the real readonly value (<select /> fields cannot have readonly as a UI restriction, e.g., UAs don't allow it).
disabled= may also be useful.
Change History (6)
comment:1 Changed 9 years ago by Michael Radziej <mir@…>
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Design decision needed
comment:3 Changed 9 years ago by iwan@…
- Resolution wontfix deleted
- Status changed from closed to reopened
comment:4 Changed 9 years ago by adrian
- Resolution set to wontfix
- Status changed from reopened to closed