heaversm / google-custom-form

Submit to a google spreadsheet using a form of your own design
194 stars 50 forks source link

google form input elements no longer have name attribute #4

Closed f0ster closed 3 years ago

f0ster commented 8 years ago

My google form didnt have a name attribute, I had to inspect the POST request in the network tab...

Then I simple changed my element names accordingly, e.g., <textarea name="entry.839337160"></textarea>

jdearaujo commented 8 years ago

For each input field in your Google forms, there is a hidden field directly after it with a name attribute. I think Google is just trying to obfuscate things, because there is no relationship to the visible field name and the name of the hidden field. If you change the name of your visible fields to the cryptic name of the hidden fields directly after it, you can post the form directly to the Google form url without any issues. It's a very manual process though.

m-stru commented 8 years ago

thanks a lot, that was so helpful!

ywalia01 commented 4 years ago

@jdearaujo @m-stru could u guide me as to where i can locate the hidden field mentioned here. I am not able to find it. Thanks

jdearaujo commented 4 years ago

@ywalia01 It's been a while so Google may have changed some things. I'll try to have a look tonight/tomorrow.

ywalia01 commented 4 years ago

Thanks for replying man! To give you some background, I stumbled upon this great article: https://www.developerdrive.com/add-google-forms-static-site/ and I was successful in making this work on my first site, but I am not able to do the same for the second one. Thanks again!

jdearaujo commented 4 years ago

The hidden fields are just below the form element, however if you check the box to collect email addresses in the google form, you won't see that additional field in the list of hidden form fields. It will cause you issues, so just insert another text field if you want to collect email addresses.

ywalia01 commented 4 years ago

I haven't selected the email collection feature, still not able to find the hidden fields. I'd really appreciate it if you could attach a screenshot. Thanks

saga95 commented 3 years ago

Do a submission through your form and check headers