Autofill in Google Form with Query Params

Hi fork, today I will share my experience about how to Autofill in Google Form with Query Params, I met such cases make a Wedding Invitation with feature give a congratulate to groom and bride.

I made the Wedding Invitation website without any backend, only use html5, javascript, Google Sheets, Google Form and Google Script.

In this case I will make people to fill form to give a congratulate to groom and bride, so I just use Google Form to input, Google Sheets to Collect the data, Google Script to make a simple API and consume it back on the Wedding Invitation website.

Because I need to show Invitation name on the website, I use javascript to read query params on the website and I need to make Google form will be autofill in the field name.


If you can see I put the invitation name in the welcome screen of the website and I need to make it in Google form too, here the step.


  1. Open your google form
  2. Click the three dots on the top right side.
  3. Click on Get pre-filled link
  4. You can fill any field you want to autofill later and then click Get link
  5. After click the Get link, you will get the autofill link in your Clipboard, there should be like this
    https://docs.google.com/forms/d/e/<google-form-id>/viewform?usp=pp_url&entry.14946344=Edinofri
  6. You can replace the value with the invitation name on the website by javascript.





Komentar