title: django - refresh one form without clearing the other
body: <p>I have a django page with two forms:</p>
  
  <pre><code>class FooForm(forms.Form):
      number = forms.CharField(
          label = "Number",
      )
      num_forms = forms.CharField(
          label = "Num Forms"
      )
  ...
  
  class BarForm(forms.Form):
      name = forms.CharField(
          label = "Name",
      )
  ...
  </code></pre>
  
  <p>One is to be displayed as a single form, and the other as a formset:</p>
  
  <pre><code>def myview(request):
          ...
          num_forms = request.GET['num_forms'])
          formsetFactory = formset_factory(BarForm, extra = num_forms)
          formset = formsetFactory()
          return render(request, 'template.html', {'form': FooForm(user), 'formset':formset, 'num_forms':num_forms)
  </code></pre>
  
  <p>I'm using <a href="https://django-crispy-forms.readthedocs.org/" rel="nofollow">django-crispy-forms</a> for setting layout and have rendered them in template.html like so:</p>
  
  <pre><code>&lt;form action="{% url myview %}" class="form-horizontal" method="post"&gt;
          {% crispy form %}
          {% if num_forms and num_forms &gt; 0 %}
              {% crispy formset formset.form.helper %}
          {% endif %}
   &lt;/form&gt;
  </code></pre>
  
  <p>The behavior I desire: A field in <code>form</code> specifies the number of forms in <code>formset</code> to display, so on update of that field <code>formset</code> reloads with that many forms displayed. The other field data in <code>form</code> should not be cleared or modified. Validation can be run, but I'd like the option to control when that happens.</p>
  
  <p>Can someone guide me on how to implement my view and/or template to make this work? Thanks!</p>