Limits submissions based on sum of a field in the form

  • Profile Image
    athdept
    Asked on April 21, 2016 at 04: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?

  • Profile Image
    jonathan
    Answered on April 21, 2016 at 05:45 PM

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

     

    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.

     

  • Profile Image
    athdept
    Answered on April 22, 2016 at 08: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?

  • Profile Image
    Kiran
    Answered 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:

    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.

     

    Hope this information helps!