Spinner resets to zero when another spinner is altered

  • Profile Image
    Asked on January 04, 2016 at 08:39 PM

    I have a simple form that shows the amount of people attending an event. They are divided into Adults and Children. Children must be accompanied by at least one Adult so I have added a condition: IF Adults Is Equal To"0" Insert "0" into Children. However if the number of Children is selected then the number of Adults is changed, the Children field updates to "0"

    How can I stop this from happening?

  • Profile Image
    Answered on January 05, 2016 at 01:42 AM

    Hi HookTours

    Randy here, a fellow JotForm user. 

    Here's the link to a live form based on your specifications. 

    Like you, I noticed that if we set the condition to Adult = 0, the conditional logic won't work. So I tried the alternative (please look at the conditional logic within the form). 

    I also added a new condition to disable the spinner button and make sure that the spinner button cannot be manipulated if Adult = 0 (please see animated gif below). 

    Hope this helps while you wait for the JotForm Support team's reply. 

    - Randy


    Hi JotForm Support team

    I discovered a glitch / bug on the spinner button. Even when disabled, the spinner can still be manipulated even if the trigger clearly states that if Adult = 0, disable Children spinner button. 

    - Same


    (Left click to view actual size)

  • Profile Image
    Answered on January 05, 2016 at 04:28 AM



    I can confirm that the spinner for Children does reset to 0 regardless of how many adults are selected.

    One workaround I can suggest is to add a hidden number field and a couple of conditions that stores the value of the Children field that will return that value to the Children spinner if the amount of adults is greater than 0.


    Here are the two conditions that I added.

    As you can see in the GIF below, the Children field does not reset when the amount of adult is greater than 0.


    Here is the link to the cloned form where I have applied the fix: https://form.jotform.com/60042241120938

    You can also clone it to see the conditions that I set. Here is a guide on how to clone a form: How to Clone an Existing Form from a URL


    Do inform us if you need further assistance,

  • Profile Image
    Answered on January 05, 2016 at 04:37 AM

    Hi grade4pagasa,


    Regarding on the glitch/bug you are reporting, I have moved it on a separate thread so we can better assist you. You can check the thread here: http://www.jotform.com/answers/736186. We will attend to your concern on that thread accordingly.


  • Profile Image
    Answered on January 05, 2016 at 09:41 AM

    Hi Chriistian, thanks for the workaround you gave to HookTours

    There are however still unanswered questions: 

    1.) why didn't the conditional logic work properly when it was set to Adults = 0? (Main issue)

    2.) why was there a need to create an additional number field (variable) if we can use the existing 2 in the form (adults & children spinner buttons) to create a conditional logic?  
    (does this mean that there's a bug / glitch and using a number field will circumvent this temporarily?)

    3.) in the workaround you provided, the children spinner can still be incremented even if Adults = 0. how can this be prevented? (please see animated gif below)
    (the specification given by HookTours was:

    Children must be accompanied by at least one Adult
    (If Adults is 0 then Children must be 0 too)

    (meaning: no adult companion - the child / children can't come - children spinner should be = 0))

    Also, thanks for creating a new thread for the bug report i made. It was escalated to the developers by Sammy

    - Randy


  • Profile Image
    Answered on January 05, 2016 at 11:57 AM

    1. I'm not sure what is causing the value to reset back to zero when the adult count is changed to a non-zero value, I'm still investigating the probable causes as to what might be triggering this.


    2. The additional field acts a temporary holder for the number of selected children since when the conditions is used directly is overrides the value of the children spinner.


    3. Regarding the third question this can be solved by disabling the field but since your reported the disabling option not being acknowledged a ticket has already been opened to address this.


    For now my colleagues approach should resolve the issue with the value being reset on the children spinner when the number of adults is changed.


  • Profile Image
    Answered on January 05, 2016 at 01:08 PM

    Hi all, Thanks for your help grade4pagasa. You got the form to work how I intended, I also like your use of the disable spinner. I will use this in the finished form. Thanks to Chriistian for your workaround too, it works perfectly for what I need. I can get the form to work now so the matter is resolved.

    Thanks again for your prompt replies

  • Profile Image
    Answered on January 05, 2016 at 03:03 PM

    On behalf of the support team and special thanks to grade4pagasa, you are very welcome.

    If you have any other question, please do not hesitate contacting us. We will be glad to assist.