Question

Suddenly this form to post directly to a public Spreadsheet has stopped:

<form action='https://drive.google.com/spreadsheet/formResponse?formkey=XXXXXXXXXXXXXXXX' method='post'>
<input type='text' name='entry.0.single' />
<input type='text' name='entry.1.single' />
[...]
</form>

I managed to do it through the Form associated to the Spreadsheet:

<form action='https://docs.google.com/forms/d/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX/formResponse' method='post'>
<input type='text' name='entry.YYYYYYYYYYY' />
<input type='text' name='entry.ZZZZZZZZZZZ' />
[...]
</form>

The problem is: the input name is different for each form, in contrast to the old way to do it, that it was entry.0, entry.1 etc. Is there any workaround for this ?

Was it helpful?

Solution

I recall reading somewhere that G doesn't like third party apps bypassing the Form in order to post directly to the spreadsheet. You might need to write a simple Apps Script or App Engine servlet to get a robust alternative.

OTHER TIPS

I just ran into this problem in the past few days with two different forms I've been using for quite some time. In my case, I had started with the html from the Google form, and re-written it in my own page, served by my server. When I saw this question, I checked the source of the new form, and pasted the action URL into my form. Didn't work, but in a different way. I then went through and replaced all the entry.x.single names with entry.10000x names. Still was getting problems. Took a while, but I finally realized that the entries that failed were type entries. The raw Google form had a subset of the entries on the form I was serving (and one entry was dynamically updated based on another one, which is why I had gone this route in the first place). I went back to the Google form and changed these to input type = text entries, which would accept anything, and I was back in business. It appears that the POST response is being validated against the list of options visible to Google on the form stored with the spreadsheet.

On my other form, which was also served from my own server, the problem seemed simpler. Again I had a "select" type entry, again with only a subset of the entries. The entries that Google knew about were fine. So I just added the rest and all was good. Note that I did NOT change the action URL, nor did I change the entry.x.single names. No idea why this works, but it does, at least for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top