Re: ChoiceField with choices will NOT select initial value

2009-09-17 Thread Jim Myers
I'm passing a list because this is a formset, not a single form. That code is part of a view function so I didn't show the def: On Sep 17, 8:21 pm, Torsten Bronger wrote: > Hallöchen! > > On a second look, I see other things that may be problematic. > > Jim Myers

Re: ChoiceField with choices will NOT select initial value

2009-09-17 Thread Torsten Bronger
Hallöchen! On a second look, I see other things that may be problematic. Jim Myers writes: > [...] > > class PhoneForm(forms.Form): > telephoneType = forms.ChoiceField(required=True,choices=[]) > def __init__(self, *args, **kwargs): > super(forms.Form, self).__init__(*args,

Re: ChoiceField with choices will NOT select initial value

2009-09-17 Thread Torsten Bronger
Hallöchen! Jim Myers writes: > [...] > > I have a Form with a ChoiceField where the choices are established > by reading them from the database. Then I try to initialize the > initial selected choice so it will be "selected" in the HTML. But > nothing I tried works. [...] I'm not sure

ChoiceField with choices will NOT select initial value

2009-09-17 Thread Jim Myers
I'm spent hours reading docs and Googling for the solution to this problem to no avail. Running Django 1.1 with mod_wsgi I have a Form with a ChoiceField where the choices are established by reading them from the database. Then I try to initialize the initial selected choice so it will be