elo80ka / django-dynamic-formset

A jQuery plugin that allows you dynamically add new forms to a rendered django formset.
675 stars 309 forks source link

Detect automatically form prefix #165

Open philippemilink opened 4 years ago

philippemilink commented 4 years ago

With this PR, when prefix isn't set, it will be found automatically, by looking for the hidden fields from the management form (just before the first formset-row as far as I am concerned).

I am not sure this works in all cases (maybe the management form isn't always before the first formset-row ?).

Let me know if you approve this PR, then I will document it and make the version bump.