[Answer]-Pass arbitrary number of form elements to Django view

1👍

If these forms correspond to the same type of object, you should be using Formsets (if you are using ModelForm take a look at Model formsets). In particular you might want to read about how to save the formset data.

This answer explains how to properly change attributes in forms added with jQuery, to avoid repeating fields’ IDs that would conflict when submitting the formset. In that thread there are also many plugins/snippets to do this, in case you want to take a look at them.

👤Aylen

Leave a comment