On Sat, 11 Aug 2007 14:36:50 +0000, Patrick Anderson wrote:

> On Sat, 11 Aug 2007 14:34:05 +0000, Patrick Anderson wrote:
> 
>> On Fri, 10 Aug 2007 18:46:18 -0700, Doug B wrote:
>> 
>> 
> -----------------------------------------------------------------------
>>>>
>>>> If I have 8 people, how should bind POST data to a form object in the
>>>> view?
>>> 
>>> You can use the 'prefix' option when instantiating the forms.  Prefix
>>> the form with the corresponding form 'number' or other unique
>>> identifier.  On post pass it the whole post dict.  It will pull the
>>> data out according to the prefix.
>>> 
>>> 
>> That's what I thought, too. One problem I have right now is to
>> dynamically assign form element id attribute based on count of the for
>> loop in the view.
> 
> Which I solved by manipulating Widget attrs in each form.base_field
> 

Now I have the problem with validation and errors, since I'm submitting 
data in one request to multiple form objects, how can I get to the errors 
and display them properly next to each field?

Perhaps it is better and simpler to deal with each form at a time, even 
if it means to have a separate submit button for each one.

>> 
>> 
> 
> 


--~--~---------~--~----~------------~-------~--~----~
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