title: ManagementForm data is missing or has been tampered with
body: <p>I am trying to create a formset to save records in a go. But, I keep getting the error when I submit my form. And if possible please as tell me how should I save my batch of records.</p>
  
  <p>My views.py:</p>
  
  <pre><code>def weekly_progress(request):
      ProgressFormSet = formset_factory(WeeklyProgressReportForm, extra=16)
      formset = ProgressFormSet(request.POST or None)
  
      if formset.is_valid():
          for f in formset:
             print(f)
  
      return render(request, "progress/progressentry.html", {'formset' : formset})
  </code></pre>
  
  <p>My forms.py</p>
  
  <pre><code>class WeeklyProgressReportForm(forms.ModelForm):
      class Meta:
         model = WeeklyProgressReport
         fields = ('target_date', 'this_date', 'pkgno', 'slno', 'description', 'unit', 'receipt_this_week', 'issue_this_week', 'erection_this_week')
         widgets = {
          'target_date': forms.DateInput(attrs={'class': 'form-control', 'readonly': 'readonly'}),
          'this_date': forms.DateInput(attrs={'class': 'form-control', 'readonly': 'readonly'}),
          'pkgno': forms.TextInput(attrs={'class': 'form-control', 'readonly': 'readonly'}),
          'slno': forms.NumberInput(attrs={'class': 'form-control', 'readonly': 'readonly'}),
          'description': forms.Textarea(attrs={'class': 'form-control', 'rows': 1, 'readonly': 'readonly'}),
          'unit': forms.TextInput(attrs={'class': 'form-control', 'readonly': 'readonly'}),
          'receipt_this_week': forms.NumberInput(attrs={'class': 'form-control', 'step': 0.01}),
          'issue_this_week': forms.NumberInput(attrs={'class': 'form-control', 'step': 0.01}),
          'erection_this_week': forms.NumberInput(attrs={'class': 'form-control', 'step': 0.01, 'readonly': 'readonly'}),
         }
  </code></pre>
  
  <p>My template:</p>
  
  <pre><code>&lt;form id="contractor-form" method="post" action=""&gt;
      {% csrf_token %}
  
      &lt;!-- First Row --&gt;
      &lt;div class="col-lg-6"&gt;
          &lt;div class="panel panel-primary"&gt;
              &lt;div class="panel-heading"&gt;Select Your Package&lt;/div&gt;
              &lt;div class="panel-body"&gt;
                  &lt;div class="col-lg-4"&gt;                        
                      &lt;h4&gt;&lt;label class="label label-primary"&gt;Package Number&lt;/label&gt;&lt;/h4&gt;
                  &lt;/div&gt;
                  &lt;div class="col-lg-4"&gt;
                      &lt;select id="pkgno-select" class="form-control"&gt;                                
                          &lt;option value="12 (BRP)"&gt;12 (BRP)&lt;/option&gt;
                          &lt;option value="13 (BRP)"&gt;13 (BRP)&lt;/option&gt;
                          &lt;option value="13 (DHB)"&gt;13 (DHB)&lt;/option&gt;
                          &lt;option value="14 (DHB)"&gt;14 (DHB)&lt;/option&gt;
                      &lt;/select&gt;
                  &lt;/div&gt;
                  &lt;div class="col-lg-4"&gt;                        
                          &lt;button type="button" id="date-edit" class="btn btn-warning"&gt;Edit Date&lt;/button&gt;                        
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  
      &lt;!-- Second Row --&gt;
      &lt;div class="col-lg-12"&gt;
          &lt;div class="panel panel-primary"&gt;
              &lt;div class="panel-heading"&gt;Quantities&lt;/div&gt;
              &lt;div class="panel-body"&gt;
                  &lt;table class="table table-hover"&gt;
                      &lt;thead&gt;
                          &lt;tr&gt;
                              &lt;th&gt;Target Date&lt;/th&gt;
                              &lt;th&gt;This Date&lt;/th&gt;
                              &lt;th&gt;Pkg Number&lt;/th&gt;
                              &lt;th&gt;Sl Number&lt;/th&gt;
                              &lt;th&gt;Description&lt;/th&gt;
                              &lt;th&gt;Unit&lt;/th&gt;
                              &lt;th&gt;Receipt This Week&lt;/th&gt;
                              &lt;th&gt;Issue This Week&lt;/th&gt;
                              &lt;th&gt;Erection This Week&lt;/th&gt;                                
                          &lt;/tr&gt;
                      &lt;/thead&gt;
                      &lt;tbody&gt;
                          {% for form in formset %}
                          &lt;tr&gt;
                             &lt;td&gt;{{ form.target_date }}&lt;/td&gt;
                             &lt;td&gt;{{ form.this_date }}&lt;/td&gt;
                             &lt;td&gt;{{ form.pkgno }}&lt;/td&gt;
                             &lt;td&gt;{{ form.slno }}&lt;/td&gt;
                             &lt;td&gt;{{ form.description }}&lt;/td&gt;
                             &lt;td&gt;{{ form.unit }}&lt;/td&gt;
                             &lt;td&gt;{{ form.receipt_this_week }}&lt;/td&gt;
                             &lt;td&gt;{{ form.issue_this_week }}&lt;/td&gt;
                             &lt;td&gt;{{ form.erection_this_week }}&lt;/td&gt;                               
                          &lt;/tr&gt;
                          {% endfor %}
                      &lt;/tbody&gt;
                  &lt;/table&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;!-- Submit Button --&gt;
      &lt;div class="well well-lg"&gt;
          &lt;button type="submit" class="btn btn-success btn-lg btn-block"&gt;Save&lt;/button&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My models.py</p>
  
  <pre><code>class WeeklyProgressReport(models.Model):
     target_date = models.DateField()
     this_date = models.DateField()
     pkgno = models.CharField(max_length=10)
     slno = models.IntegerField(max_length=2)
     description = models.CharField(max_length=50)
     unit = models.CharField(max_length=5)
     target_quantity = models.DecimalField(max_digits=12, decimal_places=2, blank=True, default=0)
     receipt_previous = models.DecimalField(max_digits=12, decimal_places=2, blank=True, default=0)
     receipt_this_week = models.DecimalField(max_digits=12, decimal_places=2, blank=True, default=0)
     issue_previous = models.DecimalField(max_digits=12, decimal_places=2, blank=True, default=0)
     issue_this_week = models.DecimalField(max_digits=12, decimal_places=2, blank=True, default=0)
     erection_previous = models.DecimalField(max_digits=12, decimal_places=2, blank=True, default=0)
     erection_this_week = models.DecimalField(max_digits=12, decimal_places=2, blank=True, default=0)    
  
     def __unicode__(self):
         return self.pkgno
  </code></pre>