for index in range(int(nb_dogs)):
    self.fields.update({('dog_%s_name' % index): forms.CharField(label=_(
        'Name'), required=False, max_length=512)})

def fields_dogs(self):
    fields = []
for index in range(int(nb_dogs)):
    fields.append({'name': self['dog_%s_name' % index]})
return fields
dynamically add field to a form