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.
Testing whether a Form Calculation result is an integerAsked by bhds on February 22, 2017 at 04:07 PM
I have set up a form which parents of students in our school can use to order various items. The order has to have a total of 15 items - I was able to implement this by setting a condition whereby the Submit button is hidden if the total number of items ordered is not 15. The number of items ordered is held in a Form Calculation field called "Elastics Count".
We would, however, like to make this order form more flexible and allow customers to order items so long as the total number ordered is a multiple of 15. I have added another Form Calculation field at the bottom of my form called "Number of packs", which is basically the number in "Elastics Counts" divided by 15. Is there a way of testing whether this value is a whole number, and hiding the Submit button if it isn't?
Alternatively, is there another way that I can hide the Submit button if the total number of items being ordered is not a multiple of 15?
I have checked your form and it currently seems correct in the calculation made on "Number of Packs", now if the result is a decimal the submit button will not show, but if it is an integer then the submit button should be displayed.
The condition you need to add to your form is like this one:
Here's a sample form, type any number and if the result is integer the submit button shows: https://form.jotform.com/70527325851961
If you have any question, let us know.
Thank you - that works very well.