title: Django Admin - Dynamic form based on dropdown(inline foreignkey)
body: <p>I got the following models</p>
  
  <pre><code>class InfoBoxType(models.Model):
      name = models.CharField(max_length=255)
  
  class InfoBox(models.Model):
      type = models.ForeignKey(InfoBoxType)
      product = models.ForeignKey(Product)
      content = models.TextField()
  
      def __unicode__(self):
          return self.type.name
  </code></pre>
  
  <p>My infobox is used in admin as an inline(so I can add how many I want dynamically).</p>
  
  <p>I want to render a different form based on what the user selects in the type dropdown.
  I have the following InfoBoxTypes: </p>
  
  <pre><code>Table, Text and BulletList
  </code></pre>
  
  <p>If the user chooses BulletList i want to render one textinput and an "add one more"-button(just like how the admin works with regular inlines but this is a nested inline...)
  If the user chooses Text I want to render a Textarea and so on...</p>
  
  <p>My question is, can I somehow create templates for this or is my best way to solve it with an Textfield that saves JSON and then generate the form with javascript based on what the user chooses?</p>