inlineformset, validation error if form.id is not displayed

The following works (but I have an additionnal column for the hidden form.id

        {% for form in data_formset %}
        <tr>
            <td>{{ form.id }}</td>
            <td>{{ form.DELETE }}</td>
            <td>{{ form.champ1 }}</td>
            <td>{{ form.champ2}}</td>                  
          </tr>
        {% endfor %}

While the following does not work, the form will raise a validation error (form.id is required)…

        {% for form in data_formset %}
        <tr>
            {{ form.id }}
            <td>{{ form.DELETE }}</td>
            <td>{{ form.champ1 }}</td>
            <td>{{ form.champ2}}</td>                  
          </tr>
        {% endfor %}

Yes, the second version is structurally incorrect - it’s not valid html. The element must be inside a td element. (You can mark that element as display: none so that it doesn’t appear - but it must be there.)