[Fixed]-Can't change default many to many widget in django form

1👍

To specify a custom widget for a field, use the widgets attribute of the inner Meta class. This should be a dictionary mapping field names to widget classes or instances.

class SeekingForm(forms.ModelForm):

    class Meta:
        model = Seeking
        widgets = {'company_type': forms.CheckboxSelectMultiple() }
        exclude = (
              'entity',
              )

Leave a comment