title: How can I process a form using Google Apps Script?
body: <p>I am a total noob when it comes to GAS, but I want to pass a form to a local JS function (to validate the data), which then calls a Google function (to add it to a spreadsheet).
  Problem is: I can't even get the values out of the form!</p>
  
  <p>My code is like this at the moment:</p>
  
  <p>index.html:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons.css"&gt;
  
  &lt;div&gt;
    &lt;form id="register" action="javascsript:void(0)" onsubmit="validateForm(this)"&gt;
      Email: &lt;input type="text" name="email" placeholder="someone@example.com" /&gt;&lt;br/&gt;
      &lt;p id="emailtext"&gt;&lt;/p&gt;&lt;br/&gt;
      Smartschool URL: &lt;input type="text" name="url" /&gt;&lt;br/&gt;
      &lt;p id="urltext"&gt;&lt;/p&gt;&lt;br/&gt;
      &lt;input type="submit" value="Submit" /&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  
  &lt;?!= include('Javascript'); ?&gt;
  </code></pre>
  
  <p>Javascript.html:</p>
  
  <pre><code>&lt;script&gt;
    function validateForm(form) {
        // THIS IS NEVER POPPING UP
        alert(form.email);
        return false;
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>GoogleCode.gs:</p>
  
  <pre><code>function doGet(e) {
    return HtmlService.createTemplateFromFile('Page').evaluate();
  }
  
  function include(filename) {
    return HtmlService.createHtmlOutputFromFile(filename)
        .getContent();
  }
  </code></pre>