Limits submissions based on sum of a field in the form

  • athdept
    Asked on April 21, 2016 at 4:32 PM

    Hello-

    Is it possible to limit the number of submissions based on the sum of a field in a form? Let's say a field's total/sum reaches 400. I want to be able to not allow any more entries. Is that possible?

  • jonathan
    Replied on April 21, 2016 at 5:45 PM

    The Form Limits Submission Limits work differently as it counts only per submission of the form...

    Limits submissions based on sum of a field in the form Image 1 Screenshot 20

     

    But I think what you can use is the Inventory Widget https://widgets.jotform.com/widget/inventory

    The Inventory widget have a number(starting count) that diminished until all used up.

    So for example, if you set the inventory to 400, you can trap the submission of the form once all quantity were used.

    Another simpler alternative is to use the source code of your form and then just add javascript function that can capture a counter to prevent the submission once used up.

    Hope this help. Let us know how we can be of further assistance.

     

  • athdept
    Replied on April 22, 2016 at 8:33 AM

    If I use the inventory widget how can I disable the form at 400?

     

    I am not a javascript programmer. Would you be able to provide the code to disable the form after a count of 400 for a specific field?

  • Kiran Support Team Lead
    Replied on April 22, 2016 at 11:17 AM

    Let me see if I can get some code for you to prevent the submissions. However, I'm not sure if it works for you, but  another alternative can be hiding the Submit the button when there is no quantity is selected in inventory widget. Please see the screenshot below:

    Limits submissions based on sum of a field in the form Image 1 Screenshot 30

    When the inventory widget is selected with a quantity, the Submit button will be displayed. When the quantity in the widget is completed, the Submit button will not be displayed.

    Limits submissions based on sum of a field in the form Image 2 Screenshot 41

     

    Hope this information helps!