title: Best way to push data in a Google Sheet from html form with javascript
body: <p>I have a simple html form:</p>
  
  <pre><code>&lt;label for="phone"&gt;Phone: &lt;/label&gt; &lt;input id="phone" type="text" /&gt;&lt;br /&gt;
  &lt;label for="address"&gt;Address: &lt;/label&gt;&lt;input id="address" type="text" /&gt;&lt;br /&gt;
  &lt;button id="submit"&gt;Submit&lt;/button&gt;
  </code></pre>
  
  <p>And a JS code that I'm trying to complete, to push data in a GSheet (I already created the application and obtained a working link like <a href="https://script.google.com/macros/s/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX/exec" rel="nofollow noreferrer">https://script.google.com/macros/s/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX/exec</a>).</p>
  
  <pre><code>    &lt;script&gt;
  
      var submit = document.getElementById("submit");
      var sample = document.getElementById("sample");
      var clear = document.getElementById("clear");
  
      submit.onclick = function(){
        var phone = document.getElementById("phone").value;
        var address = document.getElementById("address").value;
  
      // i'm lost!
  
      }
  
      &lt;/script&gt;
  </code></pre>