JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
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.
Count the number of selections madeAsked by mgcaledonian13 on June 13, 2016 at 09:51 AM
I want to warn users that they have selected more colours / sizes than they asked for in quantity.
I have a quantity order field and a dropdown selection that I want to check ie if they ask for two items and select three different colors. If this happens I want to warn that this is the case.
count quantity check different Selection
If you want to match the number of quantity to the number of items selected in your check box, then that should be possible by using conditional logic.
Here's a sample form I made based from your form: https://form.jotform.com/61644834385968
1. First, I'll add a "Text" field. This will serve as the warning message when the quantity and the number of check box items are not equal.
2. Now we will add the "Form Calculation" widget, this will be used to count the number of check box items selected. You can see I named it "Count selected items in check box".
3. Here's how the widget is setup.
count( check box field)
The count() function simply counts the number of selected items in a check box. You can learn more about the math functions here: https://www.jotform.com/help/267-Form-Calculation-Math-Function-Reference
4. Now we will compare the "Quantity" field and the "Form Calculation" widget using conditional logic. If they are not the same, then we will SHOW the "Text" field with a warning message.
Let us know if that works.
Thanks I was on that line, and I will try it latter.
As always superb service, you guys never cease to amaze me with the speed that you respond to a question. You must be the world record holders.