简体   繁体   中英

Writing to Google Docs Spreadsheets using Apps Script

I'm trying to integrate Apps Script into my website's (not a Google Site) order page so that a user's order can be written to a Google Doc spreadsheet. I don't know how to go about this because the Apps Script documentation says Apps Script can only be developed and embedded in Google Sites Pages. Is there a way I can achieve this even though my site isn't a Google Site? I'll appreciate any help at all very much, thanks in advance.

You can write a regular HTML form (not in Apps Script) and set method='post' action='the script url'. That will invoke your script with the data from the form passed into the doGet as parameters.

You can create a data capture spreadsheet, and create a Form for it. You can "clone" the form (field names and form action) into your web site.

Your spreadsheet can have an onFormSubmit action (https://developers.google.com/apps-script/understanding_events) which does whatever you need with the submitted data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM