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
3289 "MultipleHiddenInput widget is missing ""value_from_datadict"" method." anonymous Adrian Holovaty "I have a custom field that handles multiple hidden integers. The field value is a list of integers.
Example:
{{{
>>> class DaForm(forms.Form):
... values = MultipleHiddenIntegerField() # My custom field. Custom ""clean"" method and ""widget = forms.MultipleHiddenInput"".
>>> form = DaForm(initial={'values': [1, 2, 3]})
>>> print form
>>> data = MultiValueDict()
>>> data.setlist('values', ['1', '2', '3'])
>>> form = DaForm(data)
>>> print form
}}}
As you can see, the last form does not print all inputs.
I have tracked this problem to the 'value_from_datadict' method. The class 'SelectMultiple' has a version that works perfectly.
The 'MultipleHiddenInput' widget needs this method.
" defect closed Forms dev minor fixed Unreviewed 0 0 0 0 0 0