title: How to reset form fields the elegant way with javascript or jquery?
body: <p>How do I reset the form fields more elegant compared to the code below? The code is working. But if I have lots of form fields it does not look so nice. Is there a more compact way?</p>
  
  <pre><code>&lt;script&gt;
          function setSearchCriteria(){
              var searchcriteria = document.getElementById("TherapistSearch-SearchCriteria");
              searchcriteria.value = "";
          }
          function setCity(){
              var city = document.getElementById("TherapistSearch-City");
              city.value = "";
          }
          function setLastName(){
              var lastname = document.getElementById("TherapistSearch-LastName");
              lastname.value = "";
          }
          function setFirstName(){
              var firstname = document.getElementById("TherapistSearch-FirstName");
              firstname.value = "";
          }
  }
  &lt;/script&gt;
  
  &lt;input  type="button" class="btn btn-default" value="Reset form" 
  onclick="javascript:clearForms();javascript:setSearchCriteria();setCity();setLastName();setFirstName();" title="Reset form"/&gt;
  </code></pre>