title: Getting around CORS with embedded google forms
body: <p>I'm trying to send form data to google via an embedded form.</p>
  
  <p>I found this <a href="https://stackoverflow.com/questions/40560853/how-to-use-google-forms-without-iframe">post</a> that seems to answer my question but I'm getting CORS errors. Is there a way to solve this? </p>
  
  <p>Other posts seem to say that CORS isn't an issue but I'm getting the errors.</p>
  
  <p>Here is my code:</p>
  
  <p>-JS- </p>
  
  <pre><code>function ajax_post() {
    var field1 = $('#email').val();
  
    $.ajax({
        url: "https://docs.google.com/forms/d/e/xxxxxxxxxxxxxxxxxxxxxx/formResponse",
        data: {"entry.xxxxxxxxxx": field1},
        type: "POST",
        dataType: "xml",
        statusCode: {
            0: function() {
            //Success message
            },
            200: function() {
            //Success Message
            }
        }
    });
  }
  </code></pre>
  
  <p>-HTML-</p>
  
  <pre><code>&lt;form id="emailForm" target="_self" onsubmit="" action="javascript: ajax_post()"&gt;
      &lt;input id="email" type="text" autocomplete="off" tabindex="0" name="entry.xxxxxxxxxx" required&gt;
      &lt;button id="send" type="submit"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>