Hidden field in a Google Form

后端 未结 5 1148
面向向阳花
面向向阳花 2020-11-30 02:52

I am adding a unique ID to each submission of the form. Right now, I made that ID the first field, and pre-filled it with the ID, along with a help text asking the user not

5条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 03:40

    I’ve bumped into this same problem and there doesn’t seem to be any ready-made solution. Until Google decides to support hidden fields, there’s nothing we can do apart from considering other unusual approaches.

    I’ve come with one of those. It’s an un optimal solution, but it works. Bear with me.

    There is always a hidden key with an unique value in every form. Its own ID.

    If you can map trackable values with form IDs, you’re half way there.

    Here’s my problem and here is what I’ve done.

    I need to share a form to a group of users. All forms need to be identical, and users are allowed to share the form link to other people. I want to track the referrals so a hidden field that could be pre-filled and customized for each first degree user with a unique ID, would FD be optimal. But that doesn't work, so what I've done is:

    • Create a Google Spreadsheet
    • Create a list of referral codes in a sheet
    • Create a form that will work as a template
    • Iterate the referral codes, and for each one, programmatically:
      • make a copy of the template form in Drive and get its form ID
      • create a new sheet in the spreadsheet and get its ID
      • link the just created form with the just created sheet, so the latter serves as store for the former
      • get the form URL and update the referral's sheet with URL, form ID, and Sheet ID.

    In this way, I have as many "instances" of the same form that I share individually to every single user (this can also be done programmatically if you have the emails mapped to the referral codes).

    When any form is submitted, its linked sheet is updated. Using the spreadsheet "on form submit" event, I run an utility in GAS that appends all the values plus identification of the response and form, to a special sheet that serves as summary. This way I just need to look at just one sheet to see all the results from every form, and analyze it.

    Obviously, this is hard to maintain if changes are introduced to the original template form. But, for me, it works as temporary solution.

    Hope it helps.

提交回复
热议问题