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 ?
You can create Choices as mentioned by Bryan like this. In the below options Root 1, Root 2 are automatically disabled and they will look like Group Options
CHOICES = (
('-- Root 1--',
(
('ELT1', 'ELT1'),
('ELT2', 'ELT2'),
('ELT3', 'ELT3'),
)
),
('-- Root 2--',
(
('ELT3', 'ELT3'),
('ELT4', 'ELT4'),
)
),
)
The above option will display like this. In the below image, Root 1 and Root 2 are not selectable.
Hope this will clear your problem
-Vikram