title: Unable to Disable a RadioSelect Widget Using Forms Class in Django
body: <p>I have a form that contains a RadioSelect field. I am not able to disable this field in this form either in the init() method (&lt;1>/&lt;3>/&lt;4>) and/or in the creation of the RadioSelect form element (&lt;2>). There is one subclass to this form, but it does not use the radioButton field in question. I have been working on identifying what the issue is for the past 4 hours to no available. What could I have missed?</p>
  
  <p>Below is a snippet of the code that I am using:</p>
  
  <pre><code>class ExampleForm (ParentForm1, ParentForm2, ParentForm3):
  
  def __init__(self,*args, **kwargs):
      super(ExampleForm, self).__init__(*args, **kwargs)
  
      #&lt;1&gt;
      self.fields['radioButton'].widget.attrs['disabled'] = 'disabled'
      #&lt;3&gt;
      #self.fields["radioButton"].widget.attrs['disabled'] = True
      #&lt;4&gt;
      #self.fields['radioButton'].widget.attrs.update({'disabled':'disabled', 'readonly':'readonly'})
  #&lt;2&gt;
  radioButton = forms.ChoiceField(label=_("Gender"),
                                                 initial='M',
                                                 required=False,
                                                 choices=GENDER_LIST,
                                                 widget=forms.RadioSelect(attrs={"disabled":"disabled"}))
  </code></pre>
  
  <p>I am using Django 1.4.</p>