I am using model formsets and seeing a hidden field get printed for the 'id' field. This is different than what I see if I use the same modelForm and just print that form.
Let me use an example to clarify. Here's the model and form classes: class Publication(models.Model): title = models.CharField(max_length=30) class PublicationForm(forms.ModelForm): class Meta: model = Publication If I do this: p1 = Publication() publicationForm = PublicationForm(instance=p1) for field in publicationForm: print "FORM FIELD: ", field It prints the following: FORM FIELD: <input id="id_title" type="text" name="title" maxlength="30" /> If I then do this: PublicationFormSet = modelformset_factory(Publication, form = PublicationForm) publicationFormSet = PublicationFormSet() for field in publicationFormSet.forms[0]: print "FORMSET FIELD: ", field It prints this FORMSET FIELD: <input id="id_form-0-title" type="text" name="form-0- title" maxlength="30" /> FORMSET FIELD: <input type="hidden" name="form-0-id" id="id_form-0- id" /> Can anyone tell me what this hidden form-0-id field in the second "FORMSET" line is? Margie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---