Put simply, we want to prevent users from submitting a form within a period of time. For example, if user A submits the form at 6am, that person will not be able to submit another form for 24 hours. We would like to base the restriction on a specific short-answer question. My hunch is that there is a script that we can use for this, but I am not sure. Your suggestions are always appreciated.

8 Replies

There almost certainly will be a solution you can make via Google Apps Script.

Stack Overflow has a very active GAS community. You'll find a lot of existing help there. I find most of my Apps Script support there.

You'll definitely want a basic familiarity with JavaScript as you're diving into this. I've also found Google's references and quick starts invaluable in getting oriented with the possibilities. You'll mainly use the Forms and Sheets libraries to accomplish what your looking for.

Are these domain users or just random individuals off of the internet? Domain users you could possibly do this checking the back end data collection spreadsheet and the date/time the initial one was entered.

Rockn​, thanks for responding. These are users who access the form during walk-in sessions. As it stands now, the response in question would come within the first third of the form. We could always move it to the beginning of the form, if that matters.

Rockn, thank you very much. Here's a thought, what if the respondents were not anonymous, per se? For example, we have over three and a half years worth of usage data. Would it be possible to have the form search a predetermined database of users and compare that with the user information provided? To clarify:

- Let's say we have a database of over 2,000 usernames, most are recurring users- The database would simply be another tab within the Google Sheet used to collect responses- If a user entered "abc123" as their username- Is there a script that would: - check that username against the database of usernames - check to see when was the last time "abc123" completed the form - and then prevent the user from continuing with the form if the attempt is within a certain amount of time (e.g. 24 hours)- Bonus...if the "abc123" is not in the database, the script would add it to the database

Yes, I get that the respondents can enter anything since there is no authentication, but let's presume...for the most part...that people are honest. Is this scenario plausible and, if so, how would it be scripted?

You can make any form you create collect the data submitted to a back end Google Sheet. Your project seems like something you should submit to Stack Overflow as mentioned previously. I am sure you could probably accomplish most if not all of what you want with that communities help. I have had good success with getting help writing a couple of things to extend the basic functionality of Google apps with scripting.