On Dec 11, 5:08 am, Sævar Öfjörð wrote:
> I think you should provide your choices in the form field, not when
> creating an instance of the form.
Agreed. To create a dynamic form such as this, the best way would
probably be to use a custom __init__ function. In your view, when you
create your
I think you should provide your choices in the form field, not when
creating an instance of the form.
The form would then be something like this:
class StoreLocationHoursForm(BForm):
sl_list= [('-', 'Choose Location'), (u'Super City', u'901
PHILADELPHIA STREET')]
location = forms.ChoiceFie
Hi, i have a simple form:
class StoreLocationHoursForm(BForm):
location = forms.ChoiceField(required=True)
day = forms.ChoiceField(choices=bagit_constants.dow,required=True)
time_open_hours =
forms.ChoiceField(choices=constants.hours,required=True)
time_open_minutes =
forms.ChoiceFi
3 matches
Mail list logo