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.
How to increase value of field with calculate conditions and Multiple Selection widget selectionsAsked by usspwdc on January 16, 2017 at 10:54 AM
I have a dropdown widget that allows to select multiple options. I want each option to have a value for later calculations, but the widget does not allow. So I thought to use the Update/Calculate Field condition to say... IF dropdown#1 CONTAINS April 21 THEN (Num1 + 1) INTO Num1. I can only get this method to work correctly if I do something weird. If I have 3 date options in my drop down, and they all have the logic, Num1 + 1, it behaves weirdly. But if the first date, April 21, has the logic, + 1, and the others have Num1 + 1, it works. This is not a solution because the dates have to be picked in exactly that order, and many people may not do that. When viewing my form, use the Sarasota option, and note the field at the bottom that says Num2. Each date you pick for Sarasota should add 1 to the value in Num2. You can see what it ends up actually doing, but the conditions seem like they should work. I have tried the process using Text input, Number input, and the Spinner. They all behave the same.
I think that one of the issues is that your calculation field is being constantly re-calculated since you use its variable in calculation formula.
You may try an alternative approach, by passing a 1 value into a separate field if the option (date) is selected.
Then, calculate those separate fields.
Please clone the next form to check an example:
Thank you very much for your response. I was worried I might have to do that, thought there should be an easier way. One of the events has a lot of dates.
On behalf of my colleague you are welcome. Open a new thread if you need anything else, we will be glad to assist you.