I having trouble with a simple question : How to have some \"disabled\" field in a dropdown menu generated via a modelForm and choiceFied in the django Framework ?
It seems django 1.1 will allow "optgroup": Django documentation
class MyForm(forms.Form): some_field = forms.ChoiceField(choices=[ ('Audio', ( ('vinyl', 'Vinyl'), ('cd', 'CD'), ) ), ('Video', ( ('vhs', 'VHS Tape'), ('dvd', 'DVD'), ) ), ('unknown', 'Unknown'), ])
This imho is a must have.