Friday, December 30, 2011

Show deactived radio button on a form

I have the following form:

('Trial' ,'Trial')

class ApplyForm(forms.Form):

deal_type = forms.ChoiceField( required = True,


def __init__(self, *args, **kwargs):
super(ApplyForm, self).__init__(*args, **kwargs)

If a trial is no longer available, I want to show it, but as a
deactivated choice. Can I do it, and is there a way to pass argument
to the init function to tell it to do so?

I tried ApplyForm( trial = False), but it causes the super(ApplyForm,
self).__init__(*args, **kwargs)
to blow up.

You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment