From ec31b2df25d6c08d82e5c7f9dce89748e15bf739 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 25 Mar 2021 15:32:55 +0000 Subject: [PATCH] . --- rapids/templates/rapids/rapid_form.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rapids/templates/rapids/rapid_form.html b/rapids/templates/rapids/rapid_form.html index a61280c7..8fa05657 100755 --- a/rapids/templates/rapids/rapid_form.html +++ b/rapids/templates/rapids/rapid_form.html @@ -33,7 +33,9 @@ function add_answers_input_form() { var form_idx = $('#id_answers-TOTAL_FORMS').val(); - $('#answer_form_set').append($('#answer_empty_form').find("li:eq(1)").find("select").val(2).html().replace(/__prefix__/g, form_idx)); + let empty_form = $('#answer_empty_form'); + empty_form.find("li:eq(1)").find("select").val(2); + $('#answer_form_set').append(empty_form.html().replace(/__prefix__/g, form_idx)); $('#id_answers-TOTAL_FORMS').val(parseInt(form_idx) + 1); }