Hello,
My experience field by default gets displayed as a drop
down..everything works fine when it is displayed this way. However I
want the field to be displayed in my template as Radio Buttons. So I
added the line ' experience =
forms.CharField(widget=forms.RadioSelect) ' to my ModelClass.
However, when I do this then my SATISFACTION choices don't get
displayed in my template.
My Models File
SATISFACTION = (
('1', 'Agree'),('2', 'Disagree'),
)
class Survey(models.Model):
experience = models.CharField(max_length=100,
choices=SATISFACTION)
////
My ModelForm class
class SurveyForm(ModelForm):
experience = forms.CharField(widget=forms.RadioSelect)
class Meta:
model = Survey
////
Thanks for any help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---