title: Form submit doesn't work, just refreshes page
body: <p>When I click on the submit button, the data does not go to opiekunowie.php, instead the page only refreshes. I don't know why.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form id="opiekunform" method="post" autocomplete="off"&gt;
      &lt;div class="formparent"&gt;
          &lt;div class="formicon"&gt;
              &lt;img style="width: 1.5vw; height: 1.5vw; margin-top: 0.9vw;" src="ikonki/email.svg"&gt;
          &lt;/div&gt;
          &lt;input id="opiekuninput" type="text" name="opiekun" placeholder="E-mail"/&gt;
          &lt;div class="error"&gt;&lt;/div&gt;
          &lt;div class="errorarrow"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="formparent"&gt;
          &lt;input id="opiekunx" type="submit" value="Gotowe!" class="git" /&gt;
          &lt;div class="error"&gt;&lt;/div&gt;
          &lt;div class="errorarrow"&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The Javascript:</p>
  
  <pre class="lang-js prettyprint-override"><code>var opiekunx = document.getElementById("opiekunx");
  opiekunx.addEventListener("click", function eee()
  {
      //if (document.getElementById("opiekuninput").value = "")
      //    document.getElementById("opiekuninput").value = "brak";
  
      document.getElementById("opiekunform").setAttribute("action", "opiekunowie.php");
      document.getElementById("opiekunform").submit();
  }
  , false);
  </code></pre>