title: Dropdown Option Value not saving
body: <p>Hej,</p>
  
  <p>I have multiple options created by an SQL Select, one Example looks like this:</p>
  
  <pre><code>&lt;select name="FirmaID" class="selectbox" id="id_FirmaID"&gt;
    &lt;option value="1" selected=""&gt;Westcoast Computer&lt;/option&gt;
    &lt;option value="2"&gt;AppleNet&lt;/option&gt;
    &lt;option value="9"&gt;amy.rau.codes&lt;/option&gt;
    &lt;option value="11"&gt;Cybershield IVS&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>You can see value is correct the ID of this Company, the problem is if I click on save its not saving. But if I change my queryset that the output looks like:</p>
  
  <pre><code>&lt;option value="1" selected=""&gt;1&lt;/option&gt; 
  </code></pre>
  
  <p>then it's saving fine. But this looks not user-friendly. Why is Django try to save the text behind the value and not the value?</p>
  
  <p>My view looks like this (is working for other forms but without this options field.</p>
  
  <pre><code>def addKunder(request):
      # if this is a POST request we need to process the form data
      if request.method == 'POST':
          # create a form instance and populate it with data from the request:
          form = AddKunder(request.user.id,  request.POST)
          # check whether it's valid:
          if form.is_valid():
  
              form.save()         
  
              return HttpResponseRedirect('/pyOekonomi/kunder/')       
      # if a GET (or any other method) we'll create a blank form
      else:
          print ('somethin goes wrong')
          form = AddKunder(request.user.id)
      return render(request, 'pyOekonomi/modules/kunder/add.html', {'form': form})
  </code></pre>
  
  <p>Forms look like:</p>
  
  <pre><code>class AddKunder(forms.ModelForm):
      Firma = forms.CharField(widget=forms.TextInput(attrs={'class': 'input_app', 'autofocus': True}), 
                              label='Firma', 
                              required=False)
  
      Adresse = forms.CharField(widget=forms.TextInput(attrs={'class': 'input_app'}),
                                label='Adresse', 
                                required=False)
  
      Postnummer = forms.IntegerField(widget=forms.TextInput(attrs={'class': 'input_app'}),
                                      label='Postcode', 
                                      required=False)
  
      Byen = forms.CharField(widget=forms.TextInput(attrs={'class': 'input_app'}),
                             label='By', 
                             required=False)
  
      Land = forms.ModelChoiceField(widget=forms.Select(attrs={'class': 'countryselectbox'}),
                                    queryset=CountryList.objects.values_list('countryname', flat=True).order_by('code'), 
                                    initial='Denmark', 
                                    to_field_name='countryname', 
                                    required=False)
  
      CVRCountrycode = forms.ModelChoiceField(widget=forms.Select(attrs={'class': 'countryselectbox'}),
                                              label='CVR Landkode', 
                                              queryset=CountryList.objects.values_list('code', flat=True).order_by('code'), 
                                              initial='DK', 
                                              to_field_name='code', 
                                              required=False)
  
      FirmaID = forms.ModelChoiceField(queryset=None, 
                                       widget=forms.Select(attrs={'class': 'selectbox'}), 
                                       label='Firma', 
                                       to_field_name='ID', 
                                       empty_label=None)
                                       #, queryset=FirmaModule.objects.values_list('Firmanavn', flat=True).filter(UserID=self.user).order_by('Firmanavn'), to_field_name='ID', empty_label=None)
      class Meta:
          model = FirmaModule
          fields = ['Firmanavn', 'ID']
      def __init__(self, user, *args, **kwargs):
          super(AddKunder, self).__init__(*args, **kwargs)
          self.fields['FirmaID'].queryset = FirmaModule.objects.filter(UserID=user)
      #active = forms.BooleanField()
      CVR = forms.IntegerField(widget=forms.TextInput(attrs={'class': 'input_app'}),label='CVR Nummer', required=False)
      Kundenummer = forms.CharField(widget=forms.TextInput(attrs={'class': 'input_app' }), label='Kundenummer', required=True)
      class Meta:
          model = Kunder
          labels = {
              'Byen': 'By',
              'CVRCountrycode': 'Landekode',
              'CVR': 'CVR Nummer',
              'active': 'er aktiv',
              'IsFirmaKunde': 'Firmakunde',
              'FirmaID': 'Firma',
              'EMail': 'E-Mail Adresse'
              }
          fields = ['Kundenummer', 'FirmaID', 'Efternavn', 'Fornavn', 'Adresse', 'Telefon', 'Postnummer', 'Byen', 'Land', 'CVRCountrycode', 'CVR', 'active', 'IsFirmaKunde', 'UserID', 'EMail', 'Firma']
  </code></pre>
  
  <p>models:</p>
  
  <pre><code>class Kunder(models.Model):
      ID = models.AutoField(primary_key=True)
      Kundenummer = models.IntegerField('Kundenummer', unique=True)
      Firma = models.CharField('Firma', max_length=128, null=True)
      Efternavn = models.CharField('Efternavn', max_length=128)
      Fornavn = models.CharField('Fornavn', max_length=128)
      FirmaID = models.IntegerField('FirmaID')
      UserID = models.IntegerField('UserID')
      Adresse = models.CharField('Adresse', max_length=128, null=True)
      Telefon = models.CharField('Telefon', max_length=32, null=True)
      Postnummer = models.IntegerField('Postnummer', null=True)
      Byen = models.CharField('Byen', max_length=100, null=True)
      Land = models.CharField('Land', max_length=32, null=True)
      CVRCountrycode = models.CharField('CVRCountrycode', max_length=3, null=True)
      CVR = models.IntegerField('CVR', null=True)
      active = models.BooleanField(default = False)
      IsFirmaKunde = models.BooleanField(default = False)
      EMail = models.EmailField('EMail', max_length=128, null=True)
      def __str__(self):
          return self.Firma
  </code></pre>