Hi --

I am trying to set some reasonable defaults as initial field values in a
formset.  Here is what I'm doing

section_form_initial = {
            'audio_publisher':default_publisher,
            'audio_license':default_license,
            'text_format':default_text_format
            }

If I do this:
        section_forms = SectionFormSet(initial=[section_form_initial])
Only the first form has the initial values.

If I do this:
        section_forms =
SectionFormSet(initial=[section_form_initial]*extra_form_count)
The first <extra> forms have initial values, but the formset creates an
additional <extra> forms.

How can I set initial values for the correct number of forms?

Liam

--

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


Reply via email to