30👍
✅
attrs
is only valid on widgets, not fields. Try:
test_1 = forms.ModelChoiceField(queryset = '', widget=forms.Select(attrs={'class':'hidden'}))
Source:stackexchange.com