Created
January 4, 2017 05:47
-
-
Save abass/016b83cdf1efe89d8d610c2487509908 to your computer and use it in GitHub Desktop.
We post directly to the google spreadsheet from a custom form and do not use google forms; the code snippet below is in python and posts to the google sheet which is then captured via google sheet's doPost(e) function:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
form_fields = { "fname": firstName, "lname": lastName, "title": title, ... rest of form fields to go to spreadsheet} | |
url = "https://script.google.com/macros/s/[your spreadsheet key]/exec" | |
form_data = urllib.urlencode(form_fields, doseq=True) | |
result = urlfetch.fetch(url=url, payload=form_data, follow_redirects=True,method=urlfetch.POST, | |
headers={'Content-Type': 'application/x-www-form-urlencoded'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment