title: Django smart selects is not working properly
body: <p>I try to chain four categories with django smart select but it does not work properly. Django does not take or input values from in the last one. clothing_size. It is working properly till clothing sizes. That selectbox is always empty. My model:</p>
  <p>What could be the problem here? That does not seem like js problem, because other fields are working properly.</p>
  <pre><code>from django.db import models
  from smart_selects.db_fields import ChainedForeignKey
  
  # Create your models here.
  
  class MainCategory(models.Model):
      name = models.CharField(max_length=20, null=True)
  
      def __str__(self):
          return self.name
  
  class ClothingType(models.Model):
      main_category = models.ForeignKey(MainCategory, on_delete=models.CASCADE, null=True)
      clothing_type = models.CharField(max_length=64, null=True)
  
      def __str__(self):
          template = '{0.main_category} {0.clothing_type}'
          return template.format(self)
  
  class ClothingSubType(models.Model):
      main_category = models.ForeignKey(MainCategory, on_delete=models.CASCADE, null=True)
  
      # clothing_type = models.ForeignKey(ClothingType, on_delete=models.CASCADE, null=True)
      clothing_type = ChainedForeignKey(ClothingType, chained_field=&quot;main_category&quot;, chained_model_field=&quot;main_category&quot;, show_all=False, auto_choose=True, sort=True, null=True)
      clothing_sub_type = models.CharField(max_length=254, null=True)
  
      def __str__(self):
          template = '{0.main_category} {0.clothing_type} {0.clothing_sub_type}'
          return template.format(self)
          
  class ClothingSize(models.Model):
      main_category = models.ForeignKey(MainCategory, on_delete=models.CASCADE, null=True)
      clothing_type = ChainedForeignKey(ClothingType, chained_field=&quot;main_category&quot;, chained_model_field=&quot;main_category&quot;, show_all=False, auto_choose=True, sort=True, null=True)
      clothing_sub_type = ChainedForeignKey(ClothingSubType, chained_field=&quot;clothing_type&quot;, chained_model_field=&quot;clothing_type&quot;, show_all=False, auto_choose=True, sort=True, null=True)
  
      # clothing_sub_type = models.ForeignKey(ClothingSubType, on_delete=models.CASCADE, null=True)
      clothing_size = models.CharField(max_length=30, null=True)
  
      def __str__(self):
          template = '{0.main_category} {0.clothing_type} {0.clothing_sub_type} {0.clothing_size}'
          return template.format(self)
  
  class Product(models.Model):
      name = models.CharField(max_length=30, null=True)
      sku = models.CharField(max_length=20, null=True)
      main_category = models.ForeignKey(MainCategory, on_delete=models.CASCADE, null=True)
      clothing_type = ChainedForeignKey(
                                          ClothingType, 
                                          chained_field=&quot;main_category&quot;, 
                                          chained_model_field=&quot;main_category&quot;, 
                                          show_all=False, 
                                          auto_choose=True, 
                                          sort=True, 
                                          null=True
                                          )
                                          
      product_category = ChainedForeignKey(
                                          ClothingSubType, 
                                          chained_field=&quot;clothing_type&quot;, 
                                          chained_model_field=&quot;clothing_type&quot;, 
                                          show_all=False,
                                          auto_choose=True, 
                                          sort=True, 
                                          null=True
                                          )
  
      clothing_size = ChainedForeignKey(
                                          ClothingSize,
                                          chained_field=&quot;clothing_sub_type&quot;,
                                          chained_model_field=&quot;clothing_sub_type&quot;,
                                          show_all=False,
                                          auto_choose=True, 
                                          sort=True, 
                                          null=True
                                          )
  
      def __str__(self):
          template = '{0.name}'
          return template.format(self)
  </code></pre>