You have to pass the data into the form when instantiating it, eg:
form = MyForm(request.POST)

However, that means (for your example), the fields wouldn't exist yet--
move them into __init__ instead.

Some other things to note: you don't need to "title" and "email" to
the form dynamically--might as well put them in the MyForm class
definition.  Unless you're planning to upload files, you don't need
the enctype attribute in the form tag.

-Jeff

On Jul 15, 9:54 am, Srik <[EMAIL PROTECTED]> wrote:
> Hi Djangoers,
>
> I'm trying to generate a form dynamically using MyForm (Form class),
> but I'm stuck with validating or populating data.
>
> Form Class, View and template Code here:http://dpaste.com/65080/(not
> too many lines I guess :) )
>
> Good thing is I can see form (generating dynamically, based on the
> category I chose as expected), but I'm not able to do anything after
> that .
>
> When I submit form with empty values, its returning empty form no
> matter I enter data or not and also it won't throw any errors(like
> field required)
>
> Thanks,
> Srikanth
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to