You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the questions you want (highly recommend just sticking with all "text" types)
Go to Settings > Responses and make sure "Collect email address" and "Allow response editing" are both turned off.
Go to Settings > Presentations and make sure "Disable autosave for all respondents" is turned on.
Get a prefilled link: Click the 3-dots menu → "Get pre-filled link" → Fill out the form → Click "Get link" → Copy the link (see How to extract formInput data →)
Use the testing interface to generate the formInput from your prefilled link!
Using GForms.js
Option 1: Initialize a GForm Instance
Download and include gforms.js: <script type="text/javascript" src="./gforms.js"></script>
Initialize a GForm instance with the input of the form:
//This is an example formInput
let myForm = new GForm({
name: 'myGForm',
action: 'https://docs.google.com/forms/u/0/d/e/someFormId/formResponse',
questions: [
{
name: 'Question 1',
entry: '1234567890'
}, {
name: 'Question 2',
entry: '1234567891'
},
]
});
This is not a UI library, the point of this project is to provide easy utility to submit to Google forms while letting developers use their own user interface.
This project does not provide any data validation, and does not support using data validation natively in Google Forms, you'll need to validate your users' inputs and give feedback separately.
Importantly, related to the above point: I recommend only using text questions in your Google forms as that allows you to submit virtually any string. You'll get a 400 error if you submit answers in the incorrect format for many other question types (ie dropdown, multiple choice, date etc. ) This library does not do that validation for you either.