title: Adding Forms to a Formset based on previous FormWizard step
body: <p>I've been struggling with this problem and can't seem to find a solution...</p>
  
  <p>I have a FormWizard which contains two steps: a Form (step0), then a FormSet (step1):</p>
  
  <h3>forms.py</h3>
  
  <pre><code># Step 0
  class StrategyForm(forms.ModelForm):
       class Meta:
          model = Strategy
  
  # Step 1
  class LegForm(forms.ModelForm):
      class Meta:
          model = Leg
  
  LegFormSet = formset_factory(LegForm, max_num=10)
  </code></pre>
  
  <p>In step0, the user enters a number, which I would like to use in the FormSet as the "extra", i.e. if the user inputs 10 in step0, I would like the FormSet to appear with 10 Forms in the next step.</p>
  
  <p>I have tried the following based on other questions, but can't seem to find a solution:</p>
  
  <h3>views.py</h3>
  
  <pre><code>def get_form(self, step=None, data=None, files=None):
      if step is None:
          step = self.steps.current
  
      form = super(DealWizard, self).get_form(step, data, files)
  
      if step == 'leg':
          form.extra = 10
      return form
  </code></pre>
  
  <p>and</p>
  
  <pre><code>def get_form(self, step=None, data=None, files=None):
      if step is None:
          step = self.steps.current
  
      form = super(DealWizard, self).get_form(step, data, files)
  
      if step == 'leg':
          mgmt_form = form.management_form
          mgmt_form.initial[INITIAL_FORM_COUNT] = 10
          mgmt_form.initial[TOTAL_FORM_COUNT] = 10
  
      return form
  </code></pre>
  
  <p>I'm (very) new to django, so any advice will help :)</p>