google docs form collection test

by Noah

HTML

<form id="formID">
    <input class="required" type="text" placeholder="name" name="Name" required autofocus />
    
    <input class="required" type="text" placeholder="xtra" name="Comment" required />
    
    <input class="submit" type="submit" value="submit" />
</form>

JavaScript

$("form").submit(function() {
    // post the form data to the spreadsheet
    $.post("https://script.google.com/macros/s/AKfycbyOyFG6fPlMOZi6Biv8Df9qIY46_DYWK4YiPbR8hl-nfb7omMs/exec", $("form").serialize());
    
    // reset the value on the input
    $("input[type=text]").val("");
    return false;
});