Readonly
childActive child form elements.
Readonly
contextReadonly
deletedClasses to append when transitioning from an active child to a deleted form.
Readonly
deletedTracking of deleted child form elements.
Readonly
deleteHidden input to track whether a specific form has been removed.
Readonly
formsTarget element to append new child forms to.
Readonly
maxHidden input to read for the value for max forms.
Set to the value to the management field MAX_NUM_FORMS.
Readonly
minHidden input to read for the value for min forms.
Set to the value to the management field MIN_NUM_FORMS.
Readonly
templateTarget element that has the template content to clone for new forms.
__prefix__
will be replaced with the next formIndex value upon creation.
Readonly
totalHidden 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.
Static
blessingsStatic
classesStatic
outletsStatic
targetsStatic
valuesPrepare a new child element with the __prefix__
values replaced with
the next formIndex value.
Static
shouldAdd 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.
Static
after
Adds the ability for a dynamic, expanding, formset leveraging the Django formset system of inputs and management fields.
Example