[Answered ]-Empty results in dynamical form in Django

1👍

Field names should be strings:

# self.fields[queshion.id] = forms.CharField(label=queshion.text)     # Change this
self.fields[str(queshion.id)] = forms.CharField(label=queshion.text)  # to this

The keys in request.POST are strings:

form = TestForm(data=request.POST, queshions=queshions)
👤aaron

Leave a comment