﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27220	MultiWidget not considered in form submit	Andrea Angelini	nobody	"I have a custom widget for a field, for example:

{{{
class TestWidget(MultiWidget):
    def __init__(self, attrs=None):
        widgets = (
            Select(choices=func_start()),
            Select(choices=func_end())
        )
        super(TestWidget, self).__init__(widgets, attrs)

    ...


class TestModel(models.Model)
  test = ArrayField(models.PositiveSmallIntegerField(), default=list, blank=True)


class TestForm(forms.ModelForm):
    def __init__(self, *args, **kwargs):
        super(TestForm, self).__init__(*args, **kwargs)
        self.fields['test'].widget = SlotsWidget(self.facility)
}}}

It's been working fine until Django 10.0. With Django 10.1 and specifically due to this commit it breaks.

https://github.com/django/django/commit/4bc6b939944183533ae74791d21282e613f63a96#diff-70af885c2725fe87eb3b99a393268d10

`f.name` in this commit would be ""test"", but `form.data` would contain ""test_0"" and ""test_1"". For this reason form content is skipped and not saved to the form instance."	Bug	new	Forms	1.10	Normal				Unreviewed	0	0	0	0	0	0
