I am working on a custom requirement which demands to customise select option attributes. My dropdown will show the list of options, and some of those options should be shown as disabled as per certain conditions.
I have tried customising the Select widget attributes
by passing disabled = disabled
. But that disables the whole dropdown. By looking into the code of django 1.11.5, it seems that the attributes applied on Select will be applied to its options.
Can anyone please suggest how this functionality can be achieved?
Thank you