This commit is contained in:
Ross
2021-01-18 16:47:40 +00:00
parent 7ff0205bc6
commit bf06d7742c
+6 -1
View File
@@ -33,7 +33,7 @@
function add_answers_input_form() {
var form_idx = $('#id_answers-TOTAL_FORMS').val();
$('#answer_form_set').append($('#empty_form').html().replace(/__prefix__/g, form_idx));
$('#answer_form_set').append($('#answer_empty_form').html().replace(/__prefix__/g, form_idx));
$('#id_answers-TOTAL_FORMS').val(parseInt(form_idx) + 1);
}
@@ -267,4 +267,9 @@
{{ image_formset.empty_form.as_ul }}
</ul>
</div>
<div id="answer_empty_form" style="display:none">
<ul class='no_error answer-formset'>
{{ answer_formset.empty_form.as_ul }}
</ul>
</div>
{% endblock %}