﻿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
33042	Form validator cannot pass ModelMultipleChoiceField by checkbox	cloudy-sfu	cloudy-sfu	"In the form, I set:


{{{
fill_na_avg = forms.ModelMultipleChoiceField(Column.objects.all(), widget=forms.HiddenInput(), required=False)
}}}


In the HTML file, I write a group of :


{{{
<input type=""checkbox"" name=""fill_na_avg"" value=""{{ column.id }}"">

}}}

After submitting the POST, there is:


{{{
<QueryDict: {'fill_na_avg': ['41', '42', '43']}>
}}}

It seems normal but when checking it by the ""is_valid"" function, it reports:

fill_na_avg
Enter a list of values.

If I remove widget setting like:

{{{
fill_na_avg = forms.ModelMultipleChoiceField(Column.objects.all(), required=False)
}}}

It works. So, why widget affects the validation of forms?"	Cleanup/optimization	closed	Forms	3.2	Normal	invalid	form, validator, widget		Unreviewed	0	0	0	0	0	0
