If you would prefer a video check it out on youtube at
.
HTML forms are one part of the frontend development cycle that every web developer has ...
For further actions, you may consider blocking this person and/or reporting abuse
I have 4 fields in my form.
When I click submit, it shows success but the google sheet only updates the 'Date' column and all the other 4 columns remain empty.
I even changed the code a little bit
const headers = sheet.getRange(1, 1, 1, 1, 1, sheet.getLastColumn()).getValues()[0]
const nextRow = sheet.getLastRow() + 1
const newRow = headers.map(function(header) {
return header === 'Date' ? new Date() : e.parameter[header]
})
sheet.getRange(nextRow, 1, 1, 1, 1, newRow.length).setValues([newRow])
Please help
I have not change the code in Google app script and it work well. Suggest to check the script in HTML form. Since the script above may not show all, hence you may need to watch the video (youtube) for better understanding.
I figured out the issue and now my problem has been resolved. Thanks.
Hi @faraazusmani . I have a similar issue, the only difference is that I have 2 fields in my form (so 3 columns in Excel).
What was the issue in your case?
I retried 2 times but didn't make any difference.
Hi @paula , rather than changing the app script, I changed my HTML Form code instead. I did not change the number of fields or anything, everything remained the same, I just changed the code structure for the form segment.
Hey everyone,
If the form is not working, you need to make sure the
column header
matches the form inputname
This is from this line of code in the google sheets script:
const newRow = headers.map(function(header) {
return header === 'Date' ? new Date() : e.parameter[header]
})
It gets the form parameter based on what your column heading name is. I spent an hour figuring that out so hopefully this saves you some time.
I walked your path but there is no change in spreadsheet even if request returns "success". I checked twice the "web app link" and wrote the column names including "Date".
Okay, I solved it. Just retried everything and it worked. Nice tutorial, thanks!
I have 4 fields in my form.
When I click submit, it shows success but the google sheet only updates the 'Date' column and all the other 4 columns remain empty.
Please help
Please check the names of columns are in match with the field names in code
i also have same issue how can i resolve
It's a great tutorial and I can build my form. Just 2 additional questions:
the answer to your first question is to use Zapier
How do I get an email notification that I have a new form after successful submission?
You can edit the app script to adjust for that
Try using Zapier. It can handle up to 100 free customizable emails with variables.
My trigger is not getting saved even after I click the 'Save" button and authorize.
Hello, I created a video about this topic. Find it here: youtu.be/NOlxNGrm7KU
Anyidea how to add this script to a Wordpress page/form?
how to send gclid and utm data to google sheets with this script
hi
How to print data in a PDF page after sending it to a Google Spreadsheet
You can use Autocrat, an addon in Google Sheets for this. You can send up to 1000 pdfs free.
save form data to google sheets