JSFiddle - React, Tailwind, and code Playground

by Greg Borreson

HTML

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>
    <head>
        <title>Test Google Forms</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       
    </head>
    <body>
        <div>
            <div>
                <strong>Test Google Form</strong>
            </div>
            <form id="mG61Hd" target="_self" onsubmit="" action="">
                <fieldset>
                    <label>Text</label>
                    <textarea id="feed" name="feed"></textarea>
                </fieldset>
                <div style="width: 100%; display: block; float: right;">
                    <button id="send" type="submit">
                        Send
                    </button>
                </div>
            </form>
        </div>
        <script type="text/javascript">
            function postToGoogle() {
                var field3 = $('#feed').val();
 
                $.ajax({
                url: "https://docs.google.com/forms/d/e/1FAIpQLSd0iF8J9GTqoVG83fpHhT5tsJLfxKOEewWCV2cHUCnDglAqnw/formResponse",
                data: {"entry.1931699579": "Greg2", "entry.1309854026": "2", "entry.1770397646": E},
                type: "POST",
                dataType: "xml",
                statusCode: {
                    0: function() {
                        //Success message
                    },
                    200: function() {
                        //Success Message
                    }
                }
            });
            }
             
            $(document).ready(function(){
                $('#form').submit(function() {
                    postToGoogle();
                    return false;
                });
            });
        </script>
    </body>
</html>