On Mon, Mar 2, 2009 at 9:03 AM, GRoby wrote:
>
> Hello Martin,
>
> I had a similar need and did the following:
>
> Use the Dynamic Django form class from
> http://www.djangosnippets.org/snippets/714/
>
> An Example of how the form is built in my view (just a cleaned up C&P
> snippet from my code)
Hello Martin,
I had a similar need and did the following:
Use the Dynamic Django form class from
http://www.djangosnippets.org/snippets/714/
An Example of how the form is built in my view (just a cleaned up C&P
snippet from my code):
FormDictionary=BuildForm(NumberOfSpecialFields)
Hi all,
I want to create a form with dynamic fields. That is, I want to add the
fields using the __init__ method of my form:
1 class MyForm(forms.Form):
2 def __init__(self, fieldnames=(), *args, **kw):
3 for fieldname in fieldnames:
4 self.XXXfieldnameXXX = forms
3 matches
Mail list logo