[Answer]-How to add modelforms dynamically?


As Rohan says in the comments, if you have more than one of the same kind of form on a page, you should be using formsets. Each form within the formset has its own prefix which includes an ID which you can simply increment with your Javascript.

Leave a comment