How can I prevent form submissions until previous onFormSubmit is finished.

I have written a form script that eliminates the chosen answer. This means it has to process a function onFormSubmit. While the script works, the end-user has to wait 30 seconds before they click resubmit or else the choice will not be eliminated.

Is there a way I can prevent submissions until the onFormSubmit function is completed?


I was able to accomplish this (thank you AdamL) using setAcceptingResponses(enabled).

function onFormSubmit(){ var af = FormApp.getActiveForm(); var defaultClosedFor = af.getCustomClosedFormMessage(); af.setCustomClosedFormMessage("The form is currently processing a submission, please refresh the page."); af.setAcceptingResponses(false); <put your script stuff here> af.setAcceptingResponses(true); af.setCustomClosedFormMessage(defaultClosedFor); }


  • Error after uploading app to the app store
  • How to implement 3d secure payment securely
  • How to run keywords into multiple times
  • In android logcat some of the log information missing .How to see all log cat details/data or save i
  • iPhone - Same provisioning profile for different app?
  • How does overload resolution work in the context of private modifier?
  • Parse array that contains input names and values back into a form as readonly
  • Iterating over lines in a file to check for correct values(Python)
  • Entity Framework One to One navigation property not loading
  • Fiware error: Access-Control-Allow-Origin
  • Builder Factory returning different sub-interfaces
  • Xcode 6: Set Preprocessor Macros per architecture
  • Radio button show hover between two radio button using jquery
  • Django Rest Framework: getting lists from query_params without request.getlist
  • Simple command-line app I/O in Dart
  • How to capture enclosing scope in Runnable
  • Paramiko SSHException Channel Closed
  • How to replace TouchesBegan with UIGestureRecognizer
  • Parallel sieve of Eratosthenes - Java Multithreading
  • Asynchronous Sockets - Handling false socket.AcceptAsync values
  • Find longest path less than or equal to given value of an acyclic, directed graph in Python
  • Changing media screen makes div overlay
  • Consuming a WCF service in a Java Client using wsHttpBinding
  • Multiple producers single consumer locking schema
  • Bash if statement with multiple conditions
  • Tamper-proof configuration files in .NET?
  • Code in Job's Script Block after Start-Process Does not Execute
  • print() is showing quotation marks in results
  • Q promise. Difference between .when and .then
  • Illegal mix of collations for operation for date/time comparison
  • Why ng-show works with ng-repeat but ng-if doesn't? [duplicate]
  • How to handle AllServersUnavailable Exception
  • jquery mobile loadPage not working
  • Data Validation Drop Down Box Arrow Disappearing
  • retrieve vertices with no linked edge in arangodb
  • How do you join a server to an Active Directory (domain)?
  • Authorize attributes not working in MVC 4
  • Busy indicator not showing up in wpf window [duplicate]
  • Python/Django TangoWithDjango Models and Databases
  • Net Present Value in Excel for Grouped Recurring CF