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

    How to add validation for "spinner" questions.

    Asked by KeyshaunSmith on February 21, 2016 at 11:40 AM

    I would like to set a condition in which it states that "Number of Returning Students Enrolled" cannot be greater than Total Number of students enrolled. 


    Any help would be appreciated! Thanks! 

    Page URL:

  • Profile Image
    JotForm Support

    Answered by EltonCris on February 21, 2016 at 02:16 PM

    Add a text message below the second spinner field and then create a condition that shows it once the condition is met.


    Let's assume this is the form.

    Here's the condition:

    Demo: https://form.jotform.com/60515288442961

    In this condition, I added a DO action that hides the submit button so they cannot submit the form if spinner B is greater than spinner A. In your form, you can hide the pagebreak button so they can't proceed to the next page instead of the submit button.

    If you need further help, let us know.

  • Profile Image

    Answered by grade4pagasa on February 21, 2016 at 03:51 PM

    Hi KeyshaunSmith

    I would like to offer an alternative solution. 

    The conditional logic I used for the spinner validation will provide an error-proof result which eliminates the need for an error message.

    Here's the live form.

    Hope this helps. 

    - Randy, fellow JotForm user. 


  • Profile Image

    Answered by KeyshaunSmith on February 22, 2016 at 10:11 AM

    Hello Randy:

    This looks awesome! But how do I get it into my form?


  • Profile Image

    Answered by grade4pagasa on February 22, 2016 at 11:01 AM

    Hi KeyshaunSmith

    I cloned your form and added 3 conditions to achieve the same end-result of my demo on spinner validation. Here's your updated form with the new spinner validation.

    You will notice that you won't see the error message anymore since there's no error to capture :) 
    (I didn't delete the show/hide error message. It's still there - enabled. It will not activate / trigger because of the exhaustive conditions).

    Note: The only modification I did on your form is by adding the 3 conditions for the spinner button. The layout, design and pre-existing conditions weren't modified at all. 

    Hope this helps. 

    - Randy, fellow JotForm user. 



    3 conditional logic I added to the cloned form.


  • Profile Image

    Answered by grade4pagasa on February 22, 2016 at 11:02 AM

    Please delete this redundant post for February 22, 2016 at 11:02 AM. I had too many tabs open in Chrome, there was latency and accidentally did a double post. Thanks.

  • Profile Image
    JotForm Support

    Answered by Charlie on February 22, 2016 at 12:19 PM


    Thanks for sharing your ideas here in the forum. Currently, I don't see a duplicate or double post. Someone from the support team might have already deleted it. 

  • Profile Image

    Answered by grade4pagasa on February 22, 2016 at 12:27 PM

    Hi Charlie. 

    The post you replied to is the duplicate. I just replaced the entire content with the message to delete.


  • Profile Image

    Answered by KeyshaunSmith on February 22, 2016 at 01:29 PM

    Hello Randy:

    I did add the 3 conditions that you have listed above.


    This did not have the same result as you are showing above. In fact it is responding as if the conditions don't exist at all.

  • Profile Image

    Answered by grade4pagasa on February 22, 2016 at 01:55 PM

    Please be very careful when manually re-creating conditions because a simple deviation or wrong comparison operator selected can make everything futile. It would be best to clone the updated form to avoid this scenario.

    *Compare the conditional logic below to check the discrepancy (fig. 1).

    Here's the cloned form I  updated with the new spinner validation.

    Hope this helps. 

    - Randy

    fig. 1

  • Profile Image

    Answered by Ben on February 22, 2016 at 04:48 PM

    Randy is correct in regards to the conditions operators. It is also important to note that the ordr of conditions can affect what happens on the form as well (in many cases).

    Thank you Randy for another nice solution :)

    @KeyshaunSmith In case the cloning part gives any trouble, this guide should help: How to Clone an Existing Form from a URL

    Now I would like to add my suggestions as well.

    1st - if you want the total to always be higher than the one under it, we set the conditions as so:


    Basically they can add as many "enrolees" as they wish and the total will always update +1 instead of allowing them to be higher than the same.

    2nd - increase total as the other spinner is changed (if needed)

    Basically this is the same as above, just without +1 segment.

    - When is this useful? Sometimes people know exact number of one item / people, while they can not remember exactly how many of another they should set, in this case, they can simply set the number under it to any and have the total updated for the same count.

    This is the condition:

    This is the demo form: https://form.jotform.com/60526576803964

    3rd - block the entry by transferring the value from the total field

    Basically if the 2nd field wants to be larger than the total, we just give it the value of a total and instant block.

    This is how the condition looks like:


    Hope that one of them will be of help. It is however good to note that only a single one of them is needed - not all, so you can use the one that suites you best.

    This is the link to the cloning guide if you wish to get a closer look into the form: How to Clone an Existing Form from a URL

    Just to mention that are few other alternatives as well, but they result in bad UX while above seem to work properly. I would however still include a message under the spinner to explain what happens with the same fields - avoiding any confusion at a later time.