Need help setting up dynamic options for select (drop down) box of form.

2010-08-02 Thread Chris Seberino
I'm trying to make the options of a particular drop down box be determined at runtime. I added a __init__ constructor to my django.forms.Form subclass as follows... def __init__(self, data= None, error_class = d

Re: Need help setting up dynamic options for select (drop down) box of form.

2010-08-03 Thread Daniel Roseman
On Aug 3, 5:04 am, Chris Seberino wrote: > I'm trying to make the options of a particular drop down box be > determined at runtime. > > I added a __init__ constructor to my django.forms.Form subclass as > follows... > >         def __init__(self, >                            data                =

Re: Need help setting up dynamic options for select (drop down) box of form.

2010-08-03 Thread Chris Seberino
On Aug 3, 3:29 am, Daniel Roseman wrote: > Anyway, I suspect the cause is setting the widget. I found my bug. To convert a textbox to a drop down box, it isn't enough to reset the widget and choices settings. It is also necessary of course to reset the field type from a CharField to a Choices