[Fixed]-Django error: "'ChoiceField' object has no attribute 'is_hidden'"

29👍

ChoiceField is not a widget – it is a form field:

class CallForm (forms.ModelForm):
    employee_id = forms.ChoiceField(choices=FormsTools.EmployeesToTuples(Employee.objects.all()))

    class Meta:
        model = Call
        fields = ['employee_id']
👤alecxe

Leave a comment