From ddd597cc4477ea74231887d3633911a83128ae78 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 25 Mar 2021 15:28:57 +0000 Subject: [PATCH] . --- rapids/forms.py | 2 +- rapids/templates/rapids/rapid_form.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rapids/forms.py b/rapids/forms.py index dafba32e..7ea25e63 100755 --- a/rapids/forms.py +++ b/rapids/forms.py @@ -173,7 +173,7 @@ ImageFormSet = inlineformset_factory( fields=["image", "feedback_image"], exclude=[], can_delete=True, - extra=4, + extra=1, max_num=10, field_classes="testing", ) diff --git a/rapids/templates/rapids/rapid_form.html b/rapids/templates/rapids/rapid_form.html index 316917ce..9135a993 100755 --- a/rapids/templates/rapids/rapid_form.html +++ b/rapids/templates/rapids/rapid_form.html @@ -33,7 +33,7 @@ function add_answers_input_form() { var form_idx = $('#id_answers-TOTAL_FORMS').val(); - $('#answer_form_set').append($('#answer_empty_form').html().replace(/__prefix__/g, form_idx)); + $('#answer_form_set').append($('#answer_empty_form').html().replace(/__prefix__/g, form_idx).find("li:eq(1)").find("select").val(2)); $('#id_answers-TOTAL_FORMS').val(parseInt(form_idx) + 1); }