On Tue, Jan 6, 2009 at 12:20 PM, Max <adles...@gmail.com> wrote: > > Hello, > > Using the tutorial for detail.view, I changed the radio button to a > drop down. I kept the view the same as the tutorial. See > http://dpaste.com/106018/ > > When I select the choice on the drop down, I receive the error saying > I didn't make a choice. I have a mistake in either the drop down > code or I need to change the view. > > Can someone help? >
You didn't put a name on the select element, thus its value is not included when the form is posted: http://www.w3schools.com/TAGS/att_select_name.asp You are also setting the id to choice.id before you have set choice to anything, so id will be blank I believe. Note if you use Django forms: http://docs.djangoproject.com/en/dev/topics/forms/#topics-forms-index you may spare yourself from having to hand-write a lot of this form stuff. (Though it is good to learn some basics of it anyway.) Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---