title: Retrieving Values from ModelMultipleChoiceField Checkboxes
body: <p>Big Picture: <em>Ultimately I have no idea of if I approached this correctly but this is as far as I have got.</em> </p>
  
  <p>I am building a platform for lawn care industry service providers. Each company is capable of offering different services so I setup a model that allows each service provider to create their own services. </p>
  
  <p>When the service provider sets up an appointment for their customer, I want them to be able to select from a list of checkboxes.</p>
  
  <p>I large in part referenced this thread to get the logged in users entries to display. <a href="https://stackoverflow.com/questions/47937261/customizing-django-form-based-on-currently-logged-in-user">Customizing django form based on currently logged in user</a></p>
  
  <p>I have gotten as far as displaying the list of services correctly based on the logged in user but I am having trouble with the POST processing/validation. </p>
  
  <p>The form saves correctly everywhere EXCEPT where the checkboxes are selected. I ultimately want those saved into a Charfield in a different model "form_a" in a comma delimited format. </p>
  
  <p><img src="https://i.imgur.com/XNq6Nfy.png" alt="Here is the display of my current form."> </p>
  
  <p>Corresponding portion of the View:</p>
  
  <pre><code>def new_booking(request):
      page_title = "New Booking"
      template = 'jobs/new-booking.html'
      customer_id = request.GET.get('customer')
      customer = ''
  
      form_a = AddJob(request.POST or None)
      form_b = AddJobDatePicker(request.POST or None)
      form_c = PersonForm2(request.POST or None)
      form_d = AddJobServices(**{'user': request.user})
  
      more_info = False
  
      if request.method == 'POST':
          if form_a.is_valid() and form_b.is_valid():
              services = filter(lambda t: t[0] in form_d.fields['service_name'], form_d.fields['service_name'].choices)
  
  
              a = form_a.save(commit=False)
              b = form_b.save(commit=False)
              d = form_d.save(commit=False)
              # a.customer_id = CustoemrDB.objects.values_list('completed', flat=True).get(pk=pk)
              # a.booking_id = Jobs_DB.objects.values_list('pk', flat=True).get(pk=pk)
              a.customer_id = CustomerDB.objects.get(pk=152)
              a.service_request = services
              a.date_scheduled = b.date
              a.payment_method = 'visa'
              a.save()
              return redirect('index')
          else:
              return redirect('new-booking')
  </code></pre>
  
  <p>Form: </p>
  
  <pre><code>class AddJobServices(forms.ModelForm):
      service_name = forms.ModelMultipleChoiceField(
          widget=forms.CheckboxSelectMultiple,
          queryset=ContractorServices.objects.values_list('service_name', flat=True),
      )
  
      def __init__(self, *args, **kwargs):
          user = kwargs.pop('user', None)
          super(AddJobServices, self).__init__(*args, **kwargs)
          self.helper = FormHelper()
          self.helper.form_show_errors = True
  
          if user is not None:
              self.fields['service_name'].queryset = ContractorServices.objects.filter(service_parent=user).values_list('service_name', flat=True)
  
      class Meta:
          model = ContractorServices
          fields = {'service_name'}
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>class ContractorServices(models.Model):
      service_parent = models.ForeignKey(User, on_delete=models.CASCADE, default=None)
      service_name = models.CharField(max_length=150, null=True, blank=True)
      sub_service = models.CharField(max_length=150, null=True, blank=True)   # this isn't currently used but might be at some point.
      archive = models.BooleanField(default=False, null=True)
  </code></pre>
  
  <p>I am not sure if I approached this correctly and am willing to start over but I feel like I'm close. I was also told on Discord that ModelMultipleChoiceField are for M2M relationships only, but the setup I have was the only way I could get it to display correctly. </p>
  
  <p>Any help is appreciated.</p>