#16149: Allow disabling choices in a <select>
-----------------------------+------------------------------------
Reporter: scjody | Owner: scjody
Type: New feature | Status: assigned
Component: Forms | Version: 1.3
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------
Changes (by bmispelon):
* cc: bmispelon@… (added)
Comment:
Just for the record, I've just closed #5116 as a duplicate of this issue.
Its approach was to disable some choices based on their position in the
`choices` list.
I think the approach in this ticket is a bit better, though I would like
it to be more general than simply dealing with the `disabled` attribute.
I think it's a valid use-case to want to add a `class` attriute to an
`<option>` too.
There's also an issue here that I think should be adressed:
Currently, it's perfectly valid to have two `<option>` that have the same
value. With the current patch however, it's not possible to selectively
disable only one of them (since a set of all the values is used under the
hood).
--
Ticket URL: <https://code.djangoproject.com/ticket/16149#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.