Validating textboxes to hold a value up to a specified number even if not all must be filled out

  • Bechtel
    Asked on April 16, 2015 at 4:11 AM

    hi,

    on my form I have several check boxes that when they are selected makes a text box appear underneath the check box selected. The text box requests a whole number be entered to denote a %.

    What I am wondering is if there is any way to validate that the figures entered in the text boxes add up to 100?  There are up to 11 text boxes but the form user may select any number of them from only 1 to all 11.

    At present I have a simple radio button that asks the user to manually check if all the numbers add to 100 and the submit button will not appear unless they select the radio button, as I could not find/see any other way to do it.

    I have pasted the link to my form below so you can look if required.

    Many thanks,

    Ruth

     

    http://form.jotformeu.com/form/50852667335360

  • Ben
    Replied on April 16, 2015 at 11:12 AM

    Thank you for including the link as well Ruth.

    You can actually achieve that by utilizing our Form Calculation widget to add the numbers up and then use conditions to see if the value is over 100 or not.

    I made that tweak here: http://form.jotformpro.com/form/51053985639970 (on a clone of your jotform) which you can clone to your account by following the steps here: How to Clone an Existing Form from a URL

    Now, there are few things that I want to mention as well:

    1. You can use the following guide to make it simpler for you to update the form in the future: Show or Hide multiple fields at once using form collapse tool

    Basically you have only one condition to show all of the fields at once, instead of adding a condition for each and every one of them, which makes it quite easy to cause issues in the future.

    2. I noticed that you are using the conditions to pass a value from one field to another, but did not notice if that same field was used anywhere:

    ee code # - that are the fields that I am talking about, where # represents different numbers from 1 to 11 and including both.

    If you are not going to use the fields in future I would suggest removing them (the fields and conditions) as this would make your conditions simpler, which will in turn make the form faster.