In this article, we will show you how to close a Google Form at a certain time in just a few clicks.
You can set a Google Form to stop accepting responses at a certain time. While there isn't a built-in feature that will automatically close the form at a specific time, you can use a couple of methods to achieve this. Simply follow the steps below.
There are Google Forms add-ons available that can automatically close a form at a specific time. One popular add-on for this purpose is "formLimiter." Here’s how you can use it:
Locate the three dots in the top right corner of the Google Form to access additional settings. From the drop-down menu, choose “Get add-ons” to browse and install new features for your form.
In the Google Workspace Marketplace, use the search bar to find “formLimiter.”
Click on “formLimiter” from the search results and press the “Install” button. You may be prompted to grant formLimiter certain permissions.
After installation, a new sidebar should appear at the bottom-right corner of the editor. If not, go back to your form and click on the puzzle icon to see your add-ons. Choose “formLimiter” to set it up.
In the sidebar, specify the criteria for closing the form such as a maximum number of responses, a specific date and time, or a spreadsheet cell condition.
Once your criteria are set, click “Save and Enable.”
You can also use Google Apps Script to close the form automatically:
Click on the three vertical dots at the top-right corner of the editor and select “Script editor.” You should be directed to another window called Apps Script.
In the Script editor, give your project a name like "Auto Close Form."
Here's a simple script you can copy:
function closeForm() {
var form = FormApp.openById('YOUR_FORM_ID');
form.setAcceptingResponses(false);
}
To find your form ID, go back to your form and look at the URL of your form while editing it. It's the part between "d/" and "/edit." Here’s what it looks like from our example:
In our example, the code now looks like this. Remember to keep the single quotation marks.
Below the closeForm function, add another function to create a time-driven trigger:
function createTimeDrivenTriggers() {
ScriptApp.newTrigger('closeForm')
.timeBased()
.at(new Date('YYYY-MM-DD HH:MM:SS')) // Set the exact date and time
.create();
}
Your code should now look like this:
Replace <YYYY-MM-DD HH:MM:SS> with your desired date and time. For the purpose of this guide, we will set it to 2023-03-01 15:00:00.
Click on the disk icon to save your script.
Click on the function dropdown, select createTimeDrivenTriggers, and then click the play icon to run it.
A dialog will pop up asking for permission to run the script. Review the permissions and authorize the script. Once done, the execution log should state that it is completed.
You can go back to your form and test it.
We hope that this article has helped you and given you a better understanding on how to close a Google Form at a certain time. If you enjoyed this article, you might also like our article on how to show one question at a time in Google Forms or our article on rental applications in Google Forms. If you want to know how to set up workflow approval of Google Forms, we also suggest checking out our detailed guide.