JSFiddle - React, Tailwind, and code Playground

by jeremyblalock

HTML

<form id='myform'>
    <input type='email' name='entry.1427210228' placeholder='Email Address'/>
    <input type='submit'/>
</form>

JavaScript

$('#myform').submit(function(e) {
    var dataString = $(this).serialize();
    e.preventDefault();
    $.ajax({
        type: 'post',
        url: 'https://docs.google.com/forms/d/1MBzPSRSrYNGc_g__IoI7HHIGJVbXUDdM9_F0_AXmgcQ/formResponse',
        data: dataString,
        success: function(response) {
            $('#myform input[type="email"]').val('');
            alert('Successfully submitted!');
        }
    });
});