I want to automatically add new forms to a Django formset using Ajax, so that when the user clicks an \"add\" button it runs JavaScript that adds a new form (which is part o
One option would be to create a formset with every possible form, but initially set the unrequired forms to hidden - ie, display: none;
. When it's necessary to display a form, set it's css display to block
or whatever is appropriate.
Without know more details of what your "Ajax" is doing, it's hard to give a more detailed response.