title: Show input field of a form according to the value of dropdown
body: <p>I have a form which contains a dropdown and 2 other input fields.Initially I want to show only the dropdown and hide other two fields and show the other two fields when the value of dropdown is other.</p>
  
  <pre><code>&lt;form id="submit_form" name="myform" action="/download" method="post"&gt; {% csrf_token %}
    &lt;fieldset&gt;
      &lt;select name="one" onchange="if (this.value=='other'){this.form['datefrom'].style.visibility='visible'}else {this.form['datefrom'].style.visibility='hidden'};"&gt;
              &lt;option value="none" selected="selected"&gt;Select...&lt;/option&gt;
              &lt;option value = "1m" &gt;1 month&lt;/option&gt;
              &lt;option value = "2m"&gt;2 months&lt;/option&gt;
              &lt;option value = "3m"&gt;3 months&lt;/option&gt;
              &lt;option value = "other"&gt;other&lt;/option&gt;
      &lt;/select&gt;
      &lt;br&gt; From:
      &lt;br&gt;
      &lt;input type="datetime-local" name="datefrom"&gt;&lt;br&gt; To:
      &lt;br&gt;
      &lt;input type="datetime-local" name="dateto"&gt;&lt;br&gt;&lt;br&gt;
      &lt;input type="submit" value="Submit"&gt;
    &lt;/fieldset&gt;
  &lt;/form&gt;
  
  
  </code></pre>
  
  <p>In my code initially all the input fields are showing.So if anybody could me how to hide and the two datetime input fields initially and show them only when the value of dropdown is other.Any help would be appreciated.</p>