title: How to get around the FormSpree redirect?
body: <p>I got my website over on the Github Pages Service. I'm trying to implement the FormSpree free contact form but after you submit the form, it redirects you to a different website. Something I'd like to avoid. So I looked it up on the internet and of course others wanted to get rid of it too (I omitted my email in the below picture).</p>
  
  <p><a href="https://i.stack.imgur.com/ku7n3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ku7n3.png" alt="enter image description here"></a></p>
  
  <p>This is the form I got above but it doesn't actually work at all. It worked before I tried to fiddle with it though.</p>
  
  <p>Here is what the form looks like by default from FormSpree:</p>
  
  <pre><code>&lt;form action="//formspree.io/your@email.com"
        method="POST"&gt;
      &lt;input type="text" name="name"&gt;
      &lt;input type="email" name="_replyto"&gt;
      &lt;input type="submit" value="Send"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is my version (which worked fine before I tried to get around the redirect)</p>
  
  <pre><code>&lt;div class=modal-body style="background-color: #454545"&gt;
      &lt;p&gt;Please use the form below to contact us regarding feedback or any questions you may have!
          We will never use the information given below to spam you and we will never pass on your
          information to a 3rd party.&lt;/p&gt;
      &lt;p&gt;As we are using &lt;a target="_blank" href="http://formspree.io"&gt;FormSpree&lt;/a&gt; for this form
      please consult their privacy policy for any questions regarding this matter.&lt;/p&gt;
      &lt;form id="contactform" method="POST"&gt;
          &lt;div class="form-group"&gt;
              &lt;div class="input-group"&gt;
                  &lt;span class="input-group-addon"&gt;Name&lt;/span&gt;
                  &lt;input name="form-name-input" type="text" name="name" class="form-control" required&gt;
              &lt;/div&gt;
              &lt;div class="input-group"&gt;
                  &lt;span class="input-group-addon"&gt;Email&lt;/span&gt;
                  &lt;input name="form-email-input" type="email" name="_replyto" class="form-control" required&gt;
              &lt;/div&gt;
              &lt;div class="input-group"&gt;
                  &lt;span class="input-group-addon"&gt;Subject&lt;/span&gt;
                  &lt;input name="form-subject-input" type="text" name="subject" class="form-control" required&gt;
              &lt;/div&gt;
              &lt;div class="input-group"&gt;
                  &lt;span class="input-group-addon"&gt;Description&lt;/span&gt;
                  &lt;textarea name="form-description-input" name="description" class="form-control" rows="4" cols="60" required&gt;&lt;/textarea&gt;
              &lt;/div&gt;
              &lt;input type="text" name="_gotcha" style="display:none" /&gt;
              &lt;input class="btn btn-success" data-dismiss="modal" type="submit" id="form-submit-btn" value="Submit"&gt;
              &lt;input type="hidden" name="_next" value="http://www.dynamicrealities.net" onclick="FormSentConfirmation()"/&gt;
          &lt;/div&gt;
          &lt;script&gt;
              var contactform =  document.getElementById('contactform');
              contactform.setAttribute('action', '//formspree.io/' + 'dynamicrealities@gmail.com');
          &lt;/script&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  &lt;div class="modal-footer" style="background-color: #333333"&gt;
      &lt;button class="btn btn-danger btn-bg" data-dismiss="modal" type="button" id="form-dismiss-btn" onclick=""&gt;Close&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And when I call <code>_next</code> I want it to execute the following alert:</p>
  
  <pre><code>function FormSentConfirmation() {
      alert('Thanks for the email, we\'ll be in touch promptly.');
  }
  </code></pre>
  
  <p>When I press the Submit button, all that happens is that the form goes away but I don't receive any emails. I'm probably just doing this wrong as I am fairly new still to HTML/JavaScript.</p>