What code I need to add for this so that I can save the user input to google sheet.
<!DOCTYPE html>
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<title>Demo</title>
</head>
<body>
<div class="container">
<form class="needs-validation" novalidate="">
<div class="form-row">
<div class="col-md-6 mb-3">
<label for="validationCustom01">First name</label>
<input class="form-control" id="first_name" name="first_name" placeholder="First Name" required="" type="text">
<div class="valid-feedback">
Looks good!
</div>
<div class="invalid-feedback">
This is required!
</div>
</div>
</div>
<button class="btn btn-primary btn-block" type="submit">Submit</button>
</form>
</div>
<script>
const form = document.querySelector('form');
form.addEventListener('submit', function(event) {
event.preventDefault();
if (form.checkValidity() === false) {
alert("failed");
form.classList.add('was-validated');
} else {
alert("sucess");
location.replace("https://www.google.com/");
}
}, false);
</script>
</body>
</html>
**
`
This is the script I am currently using to call the user input from html form to google sheet but I cant integrate it with my first code
`
**
> <script>
> // Prevent forms from submitting.
> function preventFormSubmit() {
> var forms = document.querySelectorAll('form');
> for (var i = 0; i < forms.length; i++) {
> forms[i].addEventListener('submit', function(event) {
> event.preventDefault();
> });
> }
> }
> window.addEventListener('load', preventFormSubmit);
>
>
> function handleFormSubmit(formObject) {
> google.script.run.processForm(formObject);
> document.getElementById("myForm").reset();
> }
> </script>