title: How to override field name attribute in django model form?
body: <p>I have a model form similar to the one below:</p>
  <pre><code>class BookSearchForm(ModelForm):
  
      class Meta:
         model = Book
         fields = ['publisher', 'authors', 'category'
  </code></pre>
  <p>How to override fields <strong>name attribute</strong> in the above model form?</p>
  <p>I tried this, but it did not work:</p>
  <pre><code>class BookSearchForm(ModelForm):
  
      class Meta:
         model = Book
         fields = ['publisher', 'authors', 'category'
         widgets = {
             'publisher': forms.SelectMultiple(attrs={'name': 'pub'}),
             'authors': forms.SelectMultiple(attrs={'name': 'aut'}),
             'category': forms.SelectMultiple(attrs={'name': 'cat'}),
         }
  </code></pre>