{% load i18n cosinnus_tags widget_tweaks %} {% captureas inlineform_html %} {% with formset=inline_form %} {{ formset.management_form }} {% for inlineform in formset %} {# if inlineform.data // pre-existing? #} {# formset.management_form.initial.MIN_NUM_FORMS': 0, u'MAX_NUM_FORMS': 5, u'TOTAL_FORMS': 5, u'INITIAL_FORMS': 0 #}
{% include content_template with inlineform=inlineform %}
{% if extra_id_div %}
{% endif %}
  • {{ remove_button_label }}
{% if forloop.counter >= formset.management_form.INITIAL_FORMS.value|intify and forloop.counter < formset.management_form.MAX_NUM_FORMS.value|intify %}
  • {{ add_button_label }}
{% endif %}
{% endfor %} {% endwith %} {% endcaptureas %} {% include 'cosinnus/fields/default_field.html' with extra_html=inlineform_html label=label %}