3

We use Google Forms to manage a large school event in which each activity requires sign-up using a separate form. We have a maximum number of students per activity. How do we “close” the sign up once the maximum has been reached? Is there a way to then automatically submit data to a wait list?

2

With this little script, you can easily pre-set the number of responses.

Code

function closeForm() {
  // get active form
  var form = FormApp.getActiveForm();

  // retrieve number of responses thusfar
  var responses = form.getResponses().length;

  // set close message
  var msg = "Maximum number of respondents has been reached";

  // set max 
  var maxResponse = 3;

  // do the math
  if(responses >= maxResponse) {
    form.setAcceptingResponses(false).setCustomClosedFormMessage(msg);
  }
}

Note

In this particular case the number of responses is limited to three. Add the script, in the form editor under Tools>Script editor (same as in a Google Spreadsheet). Now the script needs to be activated, each time a submission is being made. In the script editor, under Resources, select the script to run On form submit.

enter image description here

-1

Yes there is! Look at these instructions from Lise Galuga. I have modified the code and written about it in this blogpost, but that's in Dutch;-)

  • They still have the Yeas and the Nays in the senate, but Dutch isn't really a global language anymore. – Jacob Jan Tuinstra Feb 27 '14 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.