#15256: FormSet does not respect initial values after binding
-----------------------+----------------------------------------------------
 Reporter:  mnbayazit  |          Owner:  nobody    
   Status:  new        |      Milestone:            
Component:  Forms      |        Version:  SVN       
 Keywords:  formset    |   Triage Stage:  Unreviewed
Has patch:  1          |  
-----------------------+----------------------------------------------------
 After the form is posted, if an empty form is generated, it will be
 completely empty rather than having the initial values specified on the
 form. I believe we can fix this by modifying `_construct_form` like so:

         if self.is_bound and i < self.initial_form_count():
             defaults['data'] = self.data
             defaults['files'] = self.files

 And completely remove this chunk from _get_empty_form

         if self.is_bound:
             defaults['data'] = self.data
             defaults['files'] = self.files

 I don't know why an empty form should behave any differently after the
 formset has been bound... it only seems to be causing problems.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15256>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to