What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Inventory Widget: How to limit quantity choices to specific values?

    Asked by LowerTrent on October 14, 2016 at 11:49 AM

    I would like to limit the quantities a user can select to multiples of 10

     

    formID=62804483345256

    quantity choices limit quantity inventory widget
  • Profile Image

    Answered by LowerTrent on October 14, 2016 at 11:53 AM

    i was thinking I could use some conditional logic to make sure the the quantity selected ends with a 0, but there is no suitable condition type to alert the user that the quantity must be a multiple of 10.

  • Profile Image
    JotForm Support

    Answered by Kevin_G on October 14, 2016 at 01:25 PM

    I think you will achieve this by using another widget called Form Calculation, this will help you to take and evaluate the quantity entered in the Inventory Widget, this way you will now if it ends in 0 or not. 

    Here are the steps, first add the widget to your form: 

    In the widget add this formula:

    You will also need to add a text field where you will display the message if the quantity entered is not correct:  

    Now if the number entered in the widget is not multiple of 10 the result of the calculation will be a decimal value, here you can set up a condition to show the alert message if this is the case, here is a screenshot of the condition that I have added to my form: 

    On this guide you will also find more details about conditions: Smart-Forms-Using-Conditional-Logic

    Here is the result: 

    You may also set the calculation as hidden so it does not show in the form: 

    Here is the link to my form where you can test how it works: https://www.jotformpro.com/form/62874917597981 

    Please do note that this has been applied only to the first widget in your form, but the steps for the other widgets are the same.

    However, if you have any question do not hesitate to let us know, we will be glad to assist you. 

  • Profile Image

    Answered by LowerTrent on October 14, 2016 at 03:02 PM

    thank you so much for this excellent detailed response. i will give it a try!