title: How can I send form parameters to a mailto link?
body: <p>I tried the solution at <a href="https://stackoverflow.com/questions/52637406/how-do-i-add-html-form-data-to-a-mailto-link" title="How do I add HTML form data to a mailto link">How do I add HTML form data to a mailto link
  </a> that did not work in my HTML5 snippet on mobile.</p>
  
  <pre><code>&lt;!-- contact --&gt;
  &lt;section id="section-contact" class="section appear clearfix"&gt;
      &lt;div class="container"&gt;
  
          &lt;div class="row mar-bot40"&gt;
              &lt;div class="col-md-offset-3 col-md-6"&gt;
                  &lt;div class="section-header"&gt;
                      &lt;h2 class="section-heading animated" data-animation="bounceInUp"&gt;Contact us&lt;/h2&gt;
                      &lt;p&gt;Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet consectetur, adipisci velit, sed quia non numquam.&lt;/p&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-md-8 col-md-offset-2"&gt;
                  &lt;div id="sendmessage"&gt;Your message has been sent. Thank you!&lt;/div&gt;
                  &lt;div id="errormessage"&gt;&lt;/div&gt;
                  &lt;form role="form" class="contactForm"&gt;
                      &lt;div class="form-group"&gt;
                          &lt;input type="text" name="name" class="form-control" id="name" placeholder="Your Name" data-rule="minlen:4" data-msg="Please enter at least 4 chars" /&gt;
                          &lt;div class="validation"&gt;&lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;input type="email" class="form-control" name="email" id="email" placeholder="Your Email" data-rule="email" data-msg="Please enter a valid email" /&gt;
                          &lt;div class="validation"&gt;&lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;input type="tel" class="form-control" name="telephone" id="telephone" placeholder="111-111-1111" data-rule="email" data-msg="Please enter a valid telephone number" pattern="[0-9]{3}[0-9]{3}[0-9]{4}" required /&gt;
                          &lt;div class="validation"&gt;&lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;input type="text" class="form-control" name="subject" id="subject" placeholder="Subject" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" /&gt;
                          &lt;div class="validation"&gt;&lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;textarea class="form-control" name="message" rows="5" data-rule="required" data-msg="Please write something for us" placeholder="Message"&gt;&lt;/textarea&gt;
                          &lt;div class="validation"&gt;&lt;/div&gt;
                      &lt;/div&gt;
  
                     &lt;div class="text-center"&gt;
                              &lt;button type="submit" class="line-btn green" onclick="submitForm();return false;"&gt;Submit&lt;/button&gt;
                     &lt;/div&gt;
                  &lt;/form&gt;
                  &lt;script&gt;
  function submitForm(){
      var name = document.getElementsByName("name")[0].value;
      var email = document.getElementsByName("email")[0].value;
      var phone = document.getElementsByName("telephone")[0].value;
      var subject = document.getElementsByName("subject")[0].value;
      var message = document.getElementsByName("message")[0].value;
      window.open("mailto:denver.prophit@gmail.com?subject=" + encodeURIComponent(subject) +
    "&amp;body=Name:%20" + encodeURIComponent(name) +
    "%0a%0aTelephone:%20" + encodeURIComponent(phone) +
    "%0a%0a" + encodeURIComponent(message));
  }
  &lt;/script&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>What I expected is the gmail app to open. What I got was a scroll back to the top of the page. Not sure what I missed after reading the questions from the previous question posted?</p>