Button to dynamically clone a form field
Combining the answers and work with the limitations of django the html now looks like this:

&lt;form id="create" method="post" action="/create/"&gt;
  &lt;input name="choice_set-TOTAL_FORMS" type="hidden" value="5" /&gt;
  &lt;input name="choice_set-INITIAL_FORMS" type="hidden" value="0" /&gt;
  &lt;input name="choice_set-MIN_NUM_FORMS" type="hidden" value="1" /&gt;
  &lt;input name="choice_set-MAX_NUM_FORMS" type="hidden" value="20" /&gt;
  &lt;ul id="choices"&gt;
    &lt;li&gt;
      &lt;label&gt;Choice:
        &lt;input maxlength="200" name="choice_set-0-choice_text" type="text" /&gt;
      &lt;/label&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;label&gt;Choice:
        &lt;input maxlength="200" name="choice_set-1-choice_text" type="text" /&gt;
      &lt;/label&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;label&gt;Choice:
        &lt;input maxlength="200" name="choice_set-2-choice_text" type="text" /&gt;
      &lt;/label&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;label&gt;Choice:
        &lt;input maxlength="200" name="choice_set-3-choice_text" type="text" /&gt;
      &lt;/label&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;label&gt;Choice:
        &lt;input maxlength="200" name="choice_set-4-choice_text" type="text" /&gt;
      &lt;/label&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  &lt;p&gt;
    &lt;button type="button" id="add-choice"&gt;Add another choice
    &lt;/button&gt;
  &lt;/p&gt;
  &lt;input type="submit" value="Create" /&gt;
&lt;/form&gt;


And the script like this:

function $(selector, element) {
    if (!element) {
        element = document
    }
    return element.querySelector(selector)
}

function $$(selector, element) {
    if (!element) {
        element = document
    }
    return element.querySelectorAll(selector)
}

function hasReachedMaxNum(type, form) {
    var total = parseInt(form.elements[type + "-TOTAL_FORMS"].value);
    var max = parseInt(form.elements[type + "-MAX_NUM_FORMS"].value);
    return total &gt;= max
}

function cloneMore(element, type, form) {
    var totalElement = form.elements[type + "-TOTAL_FORMS"];
    total = parseInt(totalElement.value);
    newElement = element.cloneNode(true);
    for (var input of $$("input", newElement)) {
        input.name = input.name.replace("-" + (total - 1) + "-", "-" + total + "-");
        input.value = null
    }
    total++;
    element.parentNode.insertBefore(newElement, element.nextSibling);
    totalElement.value = total;
    return newElement
}
var addChoiceButton = $("#add-choice");
addChoiceButton.onclick = function() {
    var choices = $("#choices");
    var createForm = $("#create");
    cloneMore(choices.lastElementChild, "choice_set", createForm);
    if (hasReachedMaxNum("choice_set", createForm)) {
        this.disabled = true
    }
};