some_form.fields['some_field'] = forms.ChoiceField(choices=choices, widget=
    FilterableSelectWidget)
some_form.fields['some_field'].widget.data_filter = data_filter
Django: How to build a custom form widget?