0

I'm planning an online survey about customers' orders.

enter image description here

But I don't want my user to fill OrderId field.

To solve this problem, I come to this solution:

  1. Put the OrderId into the URL, so my link will be like this: https://docs.google.com/forms/d/e/1FAIpQLSd5krwc-5LouEkaU8wdWIrg_wLLU1emAhuo0KU5My3v09NYaA/viewform?orderId=12345
  2. Get the orderId from the URL, and put it to the OrderId field

But I faced 2 problems:

  1. The forms open trigger is for editor open instead of the user's open.

enter image description here

  1. I found no way to get the current URL.

Could anyone give me some hint about these 2 problems?

Sayakiss
  • 6,878
  • 8
  • 61
  • 107
  • Checkout https://stackoverflow.com/a/20110656/ You need the url queryparameter key for `orderId` entry. It can be found when creating a prefilled url. – TheMaster Feb 07 '22 at 15:52
  • https://developers.google.com/apps-script/reference/forms/form-response?hl=en – Cooper Feb 07 '22 at 16:51

0 Answers0