Skip to content

Dynamic formsets

Sivert Olstad requested to merge dynamic-formsets into main

Closes #78 (closed)

Adds a solution for dynamically adding more forms to a formset, through JS. To make a formset dynamic, all the developer needs to do is add DynamicFormsetButton to the formset through the formset's helper. I'm going to get started on proper documentation for this and other form-related functionality in our repo.

The code for this is pretty ugly, especially after dealing with edge cases, but I don't think we can improve it much without completely pivoting our frontend to a modern framework like Vue or React. Very open for suggestions here, though!

Relevant formsets have been made dynamic, and the number of default extra forms has been reduced.

Merge request reports