title: Clear input fields on form submit
body: <p>I know this is continuously asked anew, and I've checked out different answers and tried different solutions but to no avail. In some cases it can be really be a case by case thing depending on how the code has been redacted.</p>
  
  <p>I'd like to simply have the two input fields in my page to clear when I click submit (&amp;&amp; enter - unless its a separate event, that's for another thread), considering I always press enter as opposed to clicking - this is a site just meant for my use.</p>
  
  <p>I have of course a input tag, type submit, and its working fine. But I also already have a specific onSubmit function : </p>
  
  <pre><code>function onSubmitForm(e) {
      e.preventDefault();
      var var1 = document.getElementById("name");
      var var2 = document.getElementById("review");
      arrayOne.push( {name:var1.value,review:var2.value} );
      localStorage.filmDatabase = JSON.stringify(arrayOne);
      document.getElementById("eyedee").innerHTML += '&lt;p&gt;' + '&lt;span class=name&gt;' + var1.value + '&lt;/span&gt;' + '&lt;span class=review&gt;' + var2.value + '&lt;/span&gt;';
  }
  </code></pre>
  
  <p>I'm guessing its just about putting one line of (right) code, most probably at the end of the block but I just couldn't figure it out. Thanks a lot for the help!</p>