This document explains the easiest way to extract the formInput data required for GForms.js from your Google Forms using Google's official prefilled links feature.
Uses Google Forms' official feature to get all entry IDs directly from the URL.
-
Create your Google Form with all the questions you need
-
Get a prefilled link:
- In your form editor, click the 3-dots menu (⋮)
- Select "Get pre-filled link"
- Fill out the form with any dummy answers
- Click "Get link"
- Copy the generated URL
-
Extract the formInput:
- Go to the Testing Interface
- Paste your prefilled link in the "Prefilled Link Generator" section
- Click "Generate FormInput"
- Copy the generated formInput object!
https://docs.google.com/forms/d/e/1FAIpQLSe.../viewform?usp=pp_url&entry.1301830845=Answer1&entry.369586431=Answer2&entry.1546868024=Option+1
The entry IDs (entry.1301830845, entry.369586431, etc.) are automatically extracted and used to create your formInput object.
{
"name": "extractedForm",
"action": "https://docs.google.com/forms/u/0/d/e/1FAIpQLSe.../formResponse",
"questions": [
{
"name": "Question 1",
"entry": "1301830845"
},
{
"name": "Question 2",
"entry": "369586431"
},
{
"name": "Question 3",
"entry": "1546868024"
}
]
}- Make sure you filled out the form completely when generating the prefilled link
- Check that all questions are answered - empty questions won't appear in the URL
- Try generating a new prefilled link if the first one seems incomplete
- Go back and answer ALL questions when creating the prefilled link
- Multi-choice questions: Select at least one option
- Text questions: Enter any dummy text
The generated formInput uses generic question names like "Question 1", "Question 2", etc. This is perfectly fine since:
- Entry IDs are what matter for form submission
- Question names are just labels for your code
- You can rename them in the generated formInput if needed
Once you have your formInput:
- Use our Testing Interface to test form submission
- Paste your formInput into the JSON input area
- Fill out the generated test form
- Click "Test Submission" to verify it works with Google Forms
- Check Google Forms responses to confirm data was received