Comments (1)
I figured this out actually. I used the code on the original guide with a modification. In my HTML I added the following:
<script>
window.addEventListener("load", function() {
const form = document.getElementById('googleform');
form.addEventListener("submit", function(e) {
e.preventDefault();
const data = new FormData(form);
const action = e.target.action;
fetch(action, {
method: 'POST',
body: data,
})
.then(() => {
window.location.href = 'URL of thank you page';
})
});
});
</script>
This fixed the issue and now everything is working correctly.
from form-to-google-sheets.
Related Issues (20)
- Adding date and time to the sheet when the form is submitted HOT 1
- Data not showing when form is filed from any other location HOT 1
- What about security? Anybody can do fishing attack on spreadsheet, HOT 3
- Support for images
- timestamp not appear HOT 1
- sheet not writing anything HOT 1
- Not working when sheetName other than 'Sheet1' HOT 2
- Data not being processed to form
- How to show thank you page or success message after form submission. HOT 3
- Redirecting issue when using polyfills HOT 2
- How to add captcha?
- How to have multiple forms with different sheets?
- Timestamp on the Google Sheet ?
- Redirection after POST HOT 1
- How to use in React.js
- How to redirect it to homepage instead of showing this in new tab. HOT 1
- Data from checkbox submission not showing in google sheet. HOT 1
- How to create the sheet, step 2?
- Create new issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from form-to-google-sheets.