title: Django Form (Checkbox) - unable to save data
body: <p>I am trying to display a form (with multiple select checkbox) and save the data in database. But having some problem.</p>
  
  <p>Here is my model:</p>
  
  <pre><code>class Preference(models.Model):
  
      CLASS_CHOICES = [('1', '1'), ('2', '2'), ('3', '3')]
      BOARD_CHOICES = [('C', 'CBSE'), ('I', 'ICSE'), ('S', 'State Board')]
      SUBJECT_CHOICES = [('H', 'HINDI'), ('M', 'MATH'), ('E', 'ENGLISH')]
  
      class = models.CharField(max_length=2, choices=CLASS_CHOICES, default='1', blank=False)
      board = models.CharField(max_length=2, choices=BOARD_CHOICES, default='C', blank=False)
      subject = models.CharField(max_length=2, choices=SUBJECT_CHOICES, default='M', blank=False)
  </code></pre>
  
  <p>My form:</p>
  
  <pre><code>class PreferenceForm(forms.ModelForm):
      class Meta:
          model = Preference
          fields = ['class', 'board', 'subject']
          widgets = {
              'board': forms.RadioSelect(),
              'subject': forms.CheckboxSelectMultiple()
          } 
  </code></pre>
  
  <p>My view:</p>
  
  <pre><code>def pref(request):
      form = PreferenceForm(request.POST or None)
      if form.is_valid():
          form.save()
          return render(request, 'website/thanks.html')
      else:
          print(form.errors)
          return render(request, 'website/pref.html', {'form': form})
  </code></pre>
  
  <p>It displays the form with checkbox but I am unable to save that data to database even when I select a single choice. </p>
  
  <p>Error Displayed:- `</p>
  
  <pre><code>&lt;li&gt;Subject&lt;ul class="errorlist"&gt;&lt;li&gt;Select a valid choice. [&amp;#39;H&amp;#39;, &amp;#39;M&amp;#39;] is not one of the available choices.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
  </code></pre>
  
  <p>All help/suggestions are appreciated, thanks.</p>