0

I am new to Google Apps Script The problem is that for my Google form my apps script is not running. I have tried following steps

  1. I have allowed the trigger e.g. onOpen(), onEdit() etc.
  2. I opened the form in live mode

But the script is not triggering. Please answer my question if someone have idea what is wrong.

Sully
  • 14,672
  • 5
  • 54
  • 79
Naveed Yousaf
  • 436
  • 4
  • 14

1 Answers1

2

The onOpen() and onEdit() triggers work when you are opening the form within Google Drive but not on the live form. Are you wanting to write scripts to analyse and respond to user's input? If so you can use onFormSubmit() on the spreadsheet which you use as the Destination of the form.

See example here: https://developers.google.com/apps-script/quickstart/forms

domchan
  • 21
  • 3
  • Actually I am looking to add new items in the form on runtime. I am making a form for order placement currently it can submit one order at a time, user need to submit all information again if he wants to order more than one item. That's why I am looking to add combo box and text fields dynamically in the page. I hope you will have understand my problem. – Naveed Yousaf Apr 07 '14 at 04:32
  • If you only have a few repeat customers, I guess you could set up a pre-filled form for each individual customer. Otherwise, check out the following question to see if it helps - http://stackoverflow.com/questions/14658353/how-to-generate-a-pre-filled-form-url-for-google-form. – domchan Apr 08 '14 at 07:20
  • No no actually customer is one but he wants to order more that one items, and the items are stored in drop down, I want to add drop down in the form if user need it – Naveed Yousaf Apr 09 '14 at 07:29