How to set a minimum value for spinners?

  • tracyalexander
    Asked on April 3, 2016 at 2:37 PM

    Hi

    I have various spinners in my form and I made them a required field but this did not work as it took the default value which was 0 as an entry.  So I tried changing my default value to be blank but then it automatically filled it with my minimum value of 1?

    What I want to do is if a selection (for example Cattle) is picked in my pick list then the Total number of cattle entries must be 1 or more - I cant fathom out how to do this using conditional formatting - please help

    At the moment I have my conditional formatting working so if cattle is selected then the fields and the cattle drop down show.

    Thank you as ever

  • Mike_G JotForm Support
    Replied on April 3, 2016 at 4:07 PM

    If you want to have a default value of 1 for each spinner that you have in your form, you have to set a minimum value for it in its properties. The minimum value will be 1 and in this way, a number below 1 can no longer be selected.

    How to set a minimum value for spinners? Image 1 Screenshot 20

    Let us know if this helps. Feel free to get back to us if you need any further assistance. Thank you.

  • tracyalexander
    Replied on April 4, 2016 at 3:47 AM

    As I said above when I select 1 as my minimum value and have the default as blank it is defaulting to one in my form - my conditional formatting does then not work as the form takes the one to be an actual entry when that field in fact has had no data input.

    Why did the title of my question get changed when it is obvious from my text that I was able to set a minimum value?

  • mert JotForm UI Developer
    Replied on April 4, 2016 at 5:00 AM

    To achieve the scenario you want, you need to set the "Spinner"s' "Default Value"s as blank. Please, see it from the below:

    How to set a minimum value for spinners? Image 1 Screenshot 30

     

    Then, you need to set "Update/Calculate Field" condition just like the below for every options in the field called "What entries do you wish to complete?".

    How to set a minimum value for spinners? Image 2 Screenshot 41

     

    Please, try this one and let us know the results.

    Regards.

  • tracyalexander
    Replied on April 4, 2016 at 7:24 AM

    I have done this and I selected horse/driving turnouts in the what entries do you wish to compete.  I did not enter any data in the horse/driving turnouts section and it still let me move onto the next page without completing the data in the total number of entries field.

    What I want is for every section that is completed in the what entries to you wish enter question that the user cannot move onto the 2nd page of the form without completing the Total Number of entries field in each section

    Do I just need to replace the spinner with a number field - it would be a shame as the spinner is a great function

  • mert JotForm UI Developer
    Replied on April 4, 2016 at 8:49 AM

    As natural behavior of "Spinner"s, it seems that they have always a "Default" value even if it is "0" or blank, so it is accepted as filled. Therefor, using a "Text box" field instead of it will give the solution we want. The condition can understand it as a blank field with that way.

    Please, try this one and do let us know the results.

     

    Thanks.