This script will stop the user from adding more entries to the Google Form and will force the user to submit the responses. All the other solutions, like plugins or the options to stop accepting responses, will only stop the form from accepting responses and it will kick the users without the option to send in the answered questions.
This function is by far the most requested feature from the teachers, lecturers, and professors for their online quizzes. Using this script you will be able to create online quizzes using Google Forms and force the student to submit their responses at a specific time.
The script will create a widget that you can use to close the form and force the user to submit the responses and reset back the form so you can use it again.
I have created a similar solution, a very simple app script that you can run from the app script editor, or set a time trigger and close the form automatically. If this is what you are looking for you can find the script here: Add Timer in Google Form Quiz. But, this can get confusing, so I suggest using this solution, the only downside is that you have to manually click a button to close the Google Form.
I will create a short video on how to implement it, but for now, follow this:
How to Implement
It’s very easy, just click on the button and you will have an option to copy the Form into your Drive. For the first time you have to accept the permission for the script to run, and that’s it. Now you can add/edit the Form with your questions.
Here is a step by step instructions:
Click on the button to make a copy of the form and the script in your account:
This is what you’ll get:
Click on the “Make a copy” button to copy the Form into your Drive and to open it for editing.
Next, wait for the addon icon to appear, in the top right corner, click on it and select “Force to submit (widget)”:
This will open a dialog box where you need to select “Show the widget” option:
Because you run the widget for the first time it will ask to accept the permissions:
Click on the button “Continue” and follow the on-screen instructions to grant permission to the script. If you have any problems just check this Google Script Authorization: Review and Accept the Permission Guide
After the authorization, you have to start the widget again, so click again on the addon icon and select the “Force to submit (widget)” and then “Show widget”.
That’s it, now you can control the form with two buttons on the widget “Force the user to submit” and “Reset back the Form”.
How to use it
To know how to use it first you must understand how this widget works. The basic function of this widget is to make all the sections from “Continue to next section” to “Submit form”. So when you click on the “Force the user to submit” button, it will change all the sections to “Submit form”. Now, the users already using the form cannot go to the next section and will have only the option to submit the responses.
So, the first thing is to have all the questions in a separate section, like in my form, and when the time comes you can click on the “Force the user to submit” button and all the users using the form will have only one option, to submit the responses.
If you want to use the form again you can click on the “Reset back the Form” button to reset all the sections to “Continue to next section”
If you have any questions just send in a comment and I’ll get back to you.