I have my code for formset here :
<form action="" method="POST">{% csrf_token %}
{{ FAtestform_formset.management_form }}
<table id="formset" class="form">
{% for form in FAtestform_formset.forms %}
{% if forloop.first %}
<thead><tr>
{% for field in form.visible_fields %}
<th>{{ field.label|capfirst }}</th>
{% endfor %}
</tr></thead>
{% endif %}
{% for students in student %}
<tr class="{% cycle row1,row2 %}">
{% for field in form.visible_fields %}
<td>
{# Include the hidden fields in the form #}
{{ field.errors.as_ul }}
{{ field }}
</td>
{% endfor %}
</tr>
{% endfor %}
{% endfor %}
</table>
<input type="submit" value=" Submit " />
With this I get something like this on the browser :
http://devplace.in/~sandy/screen.png
But the problem with this is that all the fields does not get saved in
the database. Only the last row of the screenshot get submitted. How
can I do it right so that all the multiple rows get submitted at once?
--
Sandeep Kaur
E-Mail: [email protected]
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.