Dear Friend,

Note :

If you hit on this link undefined datas stores in my google sheet. ( https://script.google.com/a/skillogic.com/macros/s/AKfycbwxzCaGMD-J8S7f-vp7l2mZioGBNJUBpkpPLxHV1n7WO95XzN0/exec )

My Doubts : Is it work local server, here is my code i configured all done in google sheet.

<!DOCTYPE html>
<html lang=”en”>

<head>
<title>Html form to Google Sheet</title>
<meta charset=”utf-8">
<meta name=”viewport” content=”width=device-width, initial-scale=1">
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>

<body>

<div class=”container”>
<h2>Html form to Google Sheet</h2>

<form id=”test-form”>

<div>
<label>Field 1</label>
<input type=”text” name=”form_field_1" placeholder=”Field 1" />
</div>

<div>
<label>Field 2</label>
<input type=”text” name=”form_field_2" placeholder=”Field 2" />
</div>

<div>
<label>Field 3</label>
<input type=”text” name=”form_field_3" placeholder=”Field 3" />
</div>

<div>
<label>Field 4</label>
<input type=”text” name=”form_field_4" placeholder=”Field 4" />
</div>

<div>
<button type=”submit” id=”submit-form”>Submit</button>
</div>

</form>

</div>

<script>
var $form = $(‘form#test-form’),
// url = ‘https://script.google.com/macros/s/abcdefghijklmnopqrstuvwxyz1234567890/exec'
url = ‘https://script.google.com/a/skillogic.com/macros/s/AKfycbwxzCaGMD-J8S7f-vp7l2mZioGBNJUBpkpPLxHV1n7WO95XzN0/exec'

$(‘#submit-form’).on(‘click’, function(e) {
e.preventDefault();
var jqxhr = $.ajax({
url: url,
method: “GET”,
dataType: “json”,
data: $form.serializeObject()
}).success(
// do something
);
})
</script>

</head>
</body>

</html>