title: Show and hide dynamically fields in Django form
body: <p>I have a form in Django:</p>
  
  <p>views.py:</p>
  
  <pre><code>class SearchForm(forms.Form):
      type = forms.ChoiceField(choices = ...)
      list1 = forms.ModelMultipleChoiceField(...)
      list2 = forms.ModelMultipleChoiceField(...)
  </code></pre>
  
  <p>home.htm:</p>
  
  <pre><code>&lt;td valign='top'&gt;{{ form.type }}&lt;/td&gt;
  &lt;td valign='top'&gt;{{ form.list1 }}&lt;/td&gt;
  &lt;td valign='top'&gt;{{ form.list2 }}&lt;/td&gt;
  &lt;td valign='top'&gt;&lt;input type="submit" value="Find" /&gt;&lt;/td&gt;
  </code></pre>
  
  <p>I want the list1 element to be shown and the list2 to be hide if type is 1 and vice versa in case type is 2. I want them to be hide and shown dynamically without reloading the page or any interaction with the server. </p>
  
  <p>I believe Javascript could be useful here, but I don't know it.</p>