diff --git a/django/forms/models.py b/django/forms/models.py
index 3648a45..ef1dbfb 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -749,6 +749,7 @@ class BaseInlineFormSet(BaseModelFormSet):
             # The foreign key field might not be on the form, so we poke at the
             # Model field to get the label, since we need that for error messages.
             form.fields[self.fk.name] = InlineForeignKeyField(self.instance,
+                to_field=self.fk.rel.field_name,
                 label=getattr(form.fields.get(self.fk.name), 'label', capfirst(self.fk.verbose_name))
             )
 
@@ -840,8 +841,12 @@ class InlineForeignKeyField(Field):
     def __init__(self, parent_instance, *args, **kwargs):
         self.parent_instance = parent_instance
         self.pk_field = kwargs.pop("pk_field", False)
+        self.to_field = kwargs.pop("to_field", None)
         if self.parent_instance is not None:
-            kwargs["initial"] = self.parent_instance.pk
+            if self.to_field:
+                kwargs["initial"] = getattr(self.parent_instance, self.to_field)
+            else:
+                kwargs["initial"] = self.parent_instance.pk
         kwargs["required"] = False
         kwargs["widget"] = InlineForeignKeyHiddenInput
         super(InlineForeignKeyField, self).__init__(*args, **kwargs)
@@ -853,7 +858,10 @@ class InlineForeignKeyField(Field):
             # if there is no value act as we did before.
             return self.parent_instance
         # ensure the we compare the values as equal types.
-        if force_unicode(value) != force_unicode(self.parent_instance.pk):
+        orig = self.parent_instance.pk
+        if self.to_field:
+            orig = getattr(self.parent_instance, self.to_field)
+        if force_unicode(value) != force_unicode(orig):
             raise ValidationError(self.error_messages['invalid_choice'])
         return self.parent_instance
 
diff --git a/tests/regressiontests/model_forms_regress/models.py b/tests/regressiontests/model_forms_regress/models.py
index 488e2bc..00e756b 100644
--- a/tests/regressiontests/model_forms_regress/models.py
+++ b/tests/regressiontests/model_forms_regress/models.py
@@ -28,3 +28,11 @@ class Article(models.Model):
 
     def __unicode__(self):
         return self.headline
+
+class User(models.Model):
+    serial = models.IntegerField(primary_key=True)
+    username = models.CharField(max_length=12, unique=True)
+              
+class UserSite(models.Model):
+    user = models.ForeignKey(User, to_field="username")
+    data = models.IntegerField()
diff --git a/tests/regressiontests/model_forms_regress/tests.py b/tests/regressiontests/model_forms_regress/tests.py
index ccc272e..ca2a6e0 100644
--- a/tests/regressiontests/model_forms_regress/tests.py
+++ b/tests/regressiontests/model_forms_regress/tests.py
@@ -2,11 +2,11 @@ from datetime import date
 
 from django import db
 from django import forms
-from django.forms.models import modelform_factory
+from django.forms.models import modelform_factory, inlineformset_factory
 from django.conf import settings
 from django.test import TestCase
 
-from models import Person, Triple, FilePathModel, Article, Publication
+from models import Person, Triple, FilePathModel, Article, Publication, User, UserSite
 
 class ModelMultipleChoiceFieldTests(TestCase):
 
@@ -88,3 +88,20 @@ class ManyToManyCallableInitialTests(TestCase):
 <option value="2" selected="selected">Second Book</option>
 <option value="3">Third Book</option>
 </select>  Hold down "Control", or "Command" on a Mac, to select more than one.</li>""")
+
+class ToFieldTest(TestCase):
+    # regression test for #10243
+    def test_inline_formste(self):
+        form_set = inlineformset_factory(User, UserSite)
+        user = User.objects.create(serial=1, username='apollo13')
+        user.save()
+        data = {'usersite_set-TOTAL_FORMS': u'1',
+                'usersite_set-INITIAL_FORMS': u'0',
+                'usersite_set-0-data': u'10',
+                'usersite_set-0-user': u'apollo13'}
+        f_instance = form_set(data, instance=user)
+        f_instance.is_valid()
+        f_instance.save()
+        usersite = UserSite.objects.all().values()[0]
+        self.assertEqual(usersite,{'data': 10, 'user_id': u'apollo13', 'id': 1})
+        user.delete()
