html-form-to-google-sheet: problem after submit

when I press submit I see this message: {"result":"error","error":{}}

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 29 (2 by maintainers)

Most upvoted comments

If it’s still not working for somebody: Keep in mind that google uses your native language by default. Before doing the first intialSetup change the sheetName accordingly. image Mine was “Arkusz1”, I had to redo all of the steps with this change but after this it worked like a charm.

FIXED The headers for the spreadsheet are case-sensitive with the form name attribute. The headers do not need to be in order, but the name attribute must EXACTLY match with the header.

<input name="email" type="email" placeholder="Email" required> <input name="name" type="text" placeholder="Name" required>

gh

PREVIOUSLY

“Unfortunately, I have this problem as well.”

Failed to load resource: the server responded with a status of 404 ()

hi a got a same issue {"result":"error","error":{}} My form is


<form method="POST" action="https://script.google.com/macros/s/AKfycbw4Odn2kvRBVB_-xrx23l7SjpUrfhhsWgMGZJONjPCEj_fQshsadEKtieUA7sd6FIyc9w/exec">
  <input name="email" type="email" placeholder="email" required>
  <input name="name" type="text" placeholder="name" required>
  <button type="submit">Send</button>
</form>

and header in excel like image

Could you help me?

Finaly i found what is the problem. Here -> https://github.com/levinunnink/html-form-to-google-sheet#3-run-the-initialsetup-function you must set “doPost” instead of “InitialSetup” and it will work image

Another mistake that maybe some people could be doing has to do with the Deployments.

Try to test first your deployment: Deploy > Test Deployment

Copy the URL to your HTML code (<form method=“POST” action=“URL_Test”).

After testing, now you can do the Deploy as in the documentation. Otherwise, every time you change something in your script you has to do another deployment.

ajax code for not to redirect to another page. means saving from same page not to go next page