0

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.

2
  • as far as I see, this type of application is not possible with the help of apps script Commented Sep 14, 2012 at 5:28
  • So how do you suggest it can be done, Viral? Commented Sep 16, 2012 at 8:15

2 Answers 2

0

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.

Sign up to request clarification or add additional context in comments.

2 Comments

I'm probably supposed to know this but how is doGet method used?
Could you possibly elaborate on your answer with a link to somewhere or an apps-script snippet that allows you to write/read data from a spreadsheet?
0

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.

2 Comments

What's a data capture spreadsheet and how do I create one. Also, how do I clone the form into my website?
It's just a plain old google docs spreadhseet with a form (click 'form' on the menu bar to create a form). Once you've created the form, go to it ('go to live form') and then look at the source code. You just need to replicate the field names (all of them) and form action in any HTML within your site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.