Limit number of form submissions to 1 per member

Hi guys, I am creating a form which I have connected to a google-sheets using the google sheets NPM and code provided from another forum post. However, I am trying to figure out 2 things:

  1. How to limit the total number of form submissions that way the moment it reaches a certain number of submissions, it will automatically disable all future possible submissions.

  2. How to limit the number of form submissions to 1 per site member?

Hey, Denzel.

  1. Check out this forum post regarding the general limit of database submissions that might help you start.

  2. As for the limit per member, you can set it (e.g. 5 per site member) query the collection and check how many times the relevant user (by email address/user’s id) submitted a form in question. Once you’ve checked the whole dataset, simply disable/hide the form submission.

Good luck!

Also, have a look at these previous forum posts.
https://www.wix.com/corvid/forum/community-discussion/code-to-allow-user-account-to-fill-a-form-just-one-time
https://www.wix.com/corvid/forum/community-discussion/how-to-limit-submissions-per-user