You are viewing limited content. For full access, please sign in.

Question

Question

Limit number of form submissions

asked on March 26, 2021

We are trying to use Forms to register for a training event that will be held through GoToMeeting.  There are only so many seats, so we were trying to think of a way to not allow too many people to receive the link through the confirmation email.

Someone suggested to insert data from the form into a table.  Then, do a lookup when someone is filling the form out to place the count in a hidden field.  From there we could use a gateway as to which email they would receive.  My question is, how would I get that row count out of the sql table into a hidden field?

If anyone has a better way of accomplishing this, any guidance or input would be greatly appreciated.  Thanks!

0 0

Answer

SELECTED ANSWER
replied on March 26, 2021 Show version history

Alternately, you could do all of the Database and Email work directly in Workflow.  Have your form call the Workflow after submission.  Workflow does the Database insert of the new record, then does the Database query (you don't even need a View or Stored Procedure, because Workflow can do Custom Queries to do the count).  And then Workflow can do the conditional routing to determine which email to send, and do the actual sending of the email.

Since you have to use Workflow either way for the database insert - I favor this option over the other since it keeps all of the database and email steps together, and the form itself is much simplier.

0 0
replied on March 26, 2021

Thank you sir!  I agree with you - think I like this option better.  I'm still a beginner on the SQL side of things, but can easily set this up in workflow.  I need to look into learning more about stored procedures and how those can be used with Look Up rules in Forms.  Do you know of any training out there that could help with this?

Really appreciate your help.  One other question: do you know if there is a way to unpublish a form using Workflow?  Thanks!

0 0
replied on March 26, 2021

I like "Google Institute" wink

If I want to do something, I search how to do it, there are a ton of resources out there.

Most of my stored procedures for Forms are things like reports (because I can use multiple search criteria and do things like "if year equals input -or- input equals ALL) or things that do complex calculations or comparisons on database values (because I can do things like input <= this value and >= that value and = to this third value) or things like where I want a single result from input values (like the example of getting the number of records already in the database).  I do an awful lot more Views than Stored Procedures, because they work well with Forms for so many situations.

If you wanted the form to tell the user immediately that the registration is full, instead of an email - that is where the Stored Procedure loading to forms is going to be helpful - but with the alternate email options, it really does sounds easier to implement all of that inside Workflow.

As far as unpublishing goes, I don't think there are any built-in options in Workflow.  You could probably determine how a process looks different in the LFForms database when it is published versus when it is not, and make a database update to change it - but I wouldn't recommend trying to go that route without considerable careful testing (hopefully in a test environment if you have the licensing for it) and thorough database backups.  Honestly, it would probably be easier and safer to just bcc yourself on all of the "we're sorry, registration is closed" emails, so that once they start showing up, you know to go unpublish the Form manually.

0 0
replied on March 26, 2021

You have been so helpful.  Really appreciate all your guidance.  Have a great weekend!

1 0
replied on March 26, 2021 Show version history

I'm just glad to help.  You have a great weekend too!

Also - don't forget to mark the post as answered if one of the suggestions works for you.

0 0

Replies

replied on March 26, 2021

On your database, set-up either a View or a Stored Procedure that returns a count of records in the table.  Then in LFForms you would need to make sure the database was configured and linked to the process (this is done through "Data Sources" configuration).  On the form, you would do a lookup to populate the field from the View/Stored Procedure.  You can hide the field using either Field Rules or CSS.  If you are using Field Rules, you'll want to make sure it is set to save the field values since you'll want that count to direct a Gateway or Workflow process to determine which email to send.

I can expand on any part of that you get stuck on.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.