jrief / django-formset

The missing widgets and form manipulation library for Django
https://django-formset.fly.dev/
MIT License
317 stars 30 forks source link

Is it possible to pass parameter to a form __init__ in a collection? #92

Closed lallulli closed 11 months ago

lallulli commented 11 months ago

I have a form class contained in a FormCollection.

My form has an __init__ method which expects additional parameters, such as the request object. How can I pass the request object to the form, provided that the form is created by the FormCollection code behind the scenes? In vanilla Django, I would use the get_form_kwargs method of my FormView class view.

Thank you!

jrief commented 11 months ago

Does this method help to solve your use-case?