title: How to use "django-autocomplete-light" in inline form
body: <p>I would like to use an inline model form with a 'django-autocomplete-light field'. I'm a little bit desperate also, because I don't know 'javascript' well. 
  This is a picture of my form. At first glance, it works as desired:</p>
  
  <p><a href="https://i.stack.imgur.com/CjC1W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CjC1W.png" alt="enter image description here"></a></p>
  
  <p>Unfortunately, only the first field loads correctly. If I add more fields there are errors (see pictures).</p>
  
  <p><a href="https://i.stack.imgur.com/y0rAA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y0rAA.png" alt="enter image description here"></a></p>
  
  <p>This is my form template where I suspect the error, because the first field works correctly as desired.</p>
  
  <pre><code>&lt;div class="container"&gt;
  &lt;form method="post" action=""&gt;
    {% csrf_token %}
    {{ form.as_p }}
  
    &lt;!-- Medication Table --&gt;
    &lt;table class="table"&gt;
        {{ medication.management_form }}
  
        {% for form in medication.forms %}
            {% if forloop.first %}
                &lt;thead&gt;
                &lt;tr&gt;
                    {% for field in form.visible_fields %}
                        &lt;th&gt;{{ field.label|capfirst }}&lt;/th&gt;
                    {% endfor %}
                &lt;/tr&gt;
                &lt;/thead&gt;
            {% endif %}
            &lt;tr class="{% cycle "row1" "row2" %} formset_row"&gt;
                {% for field in form.visible_fields %}
                    &lt;td&gt;
                        {# Include the hidden fields in the form #}
                        {% if forloop.first %}
                            {% for hidden in form.hidden_fields %}
                                {{ hidden }}
                            {% endfor %}
                        {% endif %}
                        {{ field.errors.as_ul }}
                        {{ field }}
                    &lt;/td&gt;
                {% endfor %}
            &lt;/tr&gt;
        {% endfor %}
    &lt;/table&gt;
  
  
  
    &lt;input type="submit" value="Submit Form"/&gt;
  
  
    &lt;script type="text/javascript" src="{% static '/js/core/jquery.3.2.1.min.js' %}"&gt;&lt;/script&gt;
    {{ form.media }}
  
      &lt;!-- script for add, delete, update --&gt;
  
      &lt;script src="{% static 'formset/jquery.formset.js' %}"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          $('.formset_row').formset({
              addText: 'add medication',
              deleteText: 'remove',
              prefix: 'medication_set'
          });
      &lt;/script&gt;
  
  
  &lt;/div&gt;
  </code></pre>