How can I restrict numeric input across multiple fields?

  • Profile Image
    Asked on February 04, 2018 at 05:55 AM


    I have guest booking form, where the user needs to input food quantities for guests. There are multiple choices of food quantities, but I need the total value across all choices to be the same value as the number of guests. For example, the user has a choice of party pies, sausage rolls etc. If they have selected that 10 guests are coming, I need to restrict the food choices across the multiple selections to be 10 and no more or less

    Is this possible to do?



  • Profile Image
    Answered on February 04, 2018 at 08:15 AM

    I understand that you want to check the number of total guests and the total value of food choices to be the same. If so, you may consider adding a Form Calculation widget to the form to add the values from the food choice fields.


    Now, you may have a text field to display an error message on the form if the total is not matching as shown below:


    You may setup the condition as displayed below to show the message and hide the submit the button to avoid the user to submit the form.


    Please see the cloned version of your JotForm with the above changes:


    If you need any further assistance or referring to something different, please let us know. We will be happy to help.