When using a formset, you need to add {{formset.management_form}}
to your form. This renders 3 fields, one of which is TOTAL_FORM_COUNT
. I want to get the ID of this field so that I can modify its value via JS. How can I do that?
I'm trying stuff like formset.management_form.TOTAL_FORM_COUNT
and .fields.TOTAL_FORM_COUNT
to get the field, and then I think auto_id
should hold the attribute I need, but I can't figure out how to access it.