Hi @Roger_vita
Yes, you can limit form submissions to only a certain number of people. Here are some ways to do it, depending on the platform you’re using for your form:
1. Using Google Forms with a Script (Advanced)
Google Forms doesn’t natively support limiting responses, but you can add a custom script to close the form after a set number of responses. Here’s how:
- Create your form in Google Forms.
- In Google Sheets, link your form by clicking on Responses > View in Sheets.
In the Google Sheets file, click Extensions > Apps Script and paste the following code:
function limitResponses() {
const maxResponses = 20; // Set the maximum number of responses
const form = FormApp.openById(“YOUR_FORM_ID”); // Replace YOUR_FORM_ID with your form’s ID
const responses = form.getResponses().length;
if (responses >= maxResponses) {
form.setAcceptingResponses(false);
}
}
- Replace YOUR_FORM_ID with the unique ID from your Google Form URL.
- Set a trigger to run this function periodically (like every minute) under Triggers in the Apps Script dashboard.
This script will automatically close the form once it reaches 20 responses.
2. Using a Form Builder with Built-in Limits
Many form builders have built-in settings for limiting the number of submissions. Here are a few that support this feature:
- JotForm: Allows you to set a maximum number of submissions and can automatically disable the form once that limit is reached.
- Typeform: You can set response limits in the settings to automatically close the form after a certain number of submissions.
- Wufoo: Provides options to limit submissions and display a custom message once the limit is reached.
In each of these tools, you’ll typically find an option in the settings under Limits or Response Limits.
3. Custom Code on Your Website
If you’re embedding a form on your website and you have coding experience (or a developer’s help), you can add JavaScript to count the number of submissions and disable the form when the limit is reached.
Here’s a basic outline:
- Use JavaScript or PHP to store the submission count in a database or a file.
- Check the count each time someone tries to submit the form.
- If the count is 20 or above, hide or disable the form and display a message that the limit has been reached.
This approach can give you complete control, but it requires technical setup.
4. Using Zapier or Integromat with Google Sheets
If you’re not comfortable with scripts, you can use an automation tool like Zapier or Integromat to manage form responses:
- Send each form submission to a Google Sheet.
- Create an automation that monitors the number of rows.
- Once the sheet has 20 rows, the automation can disable the form or send a notification to manually close it.
Summary
If you need an easy-to-implement solution, using a form builder like JotForm or Typeform would be the quickest way. If you’re using Google Forms, the script method above will work well but may require a bit more setup.
Let me know if you’d like further help with any specific tool!
Best regards,
Daisy