ReadonlychildActive child form elements.
ReadonlycontextReadonlydeletedClasses to append when transitioning from an active child to a deleted form.
ReadonlydeletedTracking of deleted child form elements.
ReadonlydeleteHidden input to track whether a specific form has been removed.
ReadonlyformsTarget element to append new child forms to.
ReadonlymaxHidden input to read for the value for max forms.
Set to the value to the management field MAX_NUM_FORMS.
ReadonlyminHidden input to read for the value for min forms.
Set to the value to the management field MIN_NUM_FORMS.
ReadonlytemplateTarget element that has the template content to clone for new forms.
__prefix__ will be replaced with the next formIndex value upon creation.
ReadonlytotalHidden input to track the total forms (including deleted) for POST request and initial reading.
Value tracking for the total amount of forms either active or deleted.
StaticblessingsStaticclassesStaticoutletsStatictargetsStaticvaluesPrepare a new child element with the __prefix__ values replaced with
the next formIndex value.
StaticshouldAdd a new child form from the template content.
When a new child is added, update the total count and dispatch an added event.
When removed, add the class and update the total count. Also update the DELETE input for this form.
Find the event's target's closest child target and remove it by removing the 'child' target and adding a 'child-removed' target.
When the totalValue changes, update the management fields and dispatch a change event for the TOTAL_FORMS input.
Staticafter
Adds the ability for a dynamic, expanding, formset leveraging the Django formset system of inputs and management fields.
Example