def get_form(self):
        form_kwargs = {}
        multi_form_attrs = {
            'multivalue_fields': [i['field'] for i in self.fields],
            'model': self.model,
            'one_of_mulitvalue_required': self.one_of_mulitval_required,
        }
        for item in self.fields:
            field_type = self.model._meta.get_field(item['field'])
            required = item.get('required', not field_type.blank)
            if isinstance(field_type, models.IntegerField):
                multi_form_attrs[item['field']] = IntegerMultilineField(
                    allow_duplicates=item['allow_duplicates'],
                    required=required,
                )
            else:
                multi_form_attrs[item['field']] = MultilineField(
                    allow_duplicates=item['allow_duplicates'],
                    required=required,
                )

        multi_form = type(
            'MultiForm', (MultivalueFormMixin, forms.Form), multi_form_attrs
        )
        if self.request.method == 'POST':
            form_kwargs['data'] = self.request.POST
        return multi_form(**form_kwargs)
dataset/ETHPy150Open allegro/ralph/src/ralph/admin/views/multiadd.py/MultiAddView.get_form/original