GOOGLE SHEET SCRIPT
<script>
const scriptURL = 'https://script.google.com/macros/s/AKfycbxJsqog2J2UKKPcMpFWgNpmXJ9jwxWvc-ItRwFToS2QTgNq_rQ/exec'
const form = document.forms['google-sheet']
form.addEventListener('submit', e => {
e.preventDefault()
fetch(scriptURL, { method: 'POST', body: new FormData(form)})
.then(response => alert("Thanks for Contacting us..! We Will Contact You Soon..."))
.catch(error => console.error('Error!', error.message))
})
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
No comments:
Post a Comment