I hacked my way through my problem this weekend, and I posted a snippet about it here.
For anyone having problems with complex dynamic formsets, check check out Malcolm Tredinnick's blog: http://www.pointy-stick.com/blog/2008/01/06/django-tip-complex-forms/ And additionally, take a look at my attempts to turn his solution into a formset: http://www.djangosnippets.org/snippets/1290/ Hope that is helpful to someone out there. J On Jan 14, 7:03 pm, James Smagala <smag...@gmail.com> wrote: > Hey All, > > There is a discussion here about building dynamic form select fields > using __init__ on the form. This, by itself, is not hard. > > http://groups.google.com/group/django-users/browse_thread/thread/98bd... > > Problem: I have a formset that needs each form in it to be created in > this dynamic sort of manner. > > Possible solutions: > > - Create the formset containing no forms, add them individually, and > update the management form. I had this mostly implemented, but I > don't know how to actually update the values on the management form. > Where do they live? > > - Figure out some tricky syntax that lets me pass both the queryset > for a modelchoicefield (and an initial choice for said field) to a > form. Also figure out how to pass it though a formset to correctly > init all those dynamic forms. Not having much luck here. > > - Post about it, and get told I'm doing it all wrong. Suggestions are > welcome! > > Please help! > > James --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---