-
JuventudeAdventistaAsked on April 4, 2016 at 9:10 AMLet me now make you one questions related to a widget used "Visual Multi
Select". We inserted some of this, but to be only visible one at time,
according to option choose above, and are build to help user to know what
will be his value with "inscriçao" as a base value with xx€ and other
options with (+yy€). Is it posible to calculate total value (sum) of
selected options?
Greetings,
Pablo -
CharlieReplied on April 4, 2016 at 9:43 AM
Unfortunately, the Visual Multi Select widget is not designed to hold a calculation value and sum them up.
However, this is possible using conditional logic and a form calculation widget.
Here's a sample form that I made: https://form.jotform.com/60943709997979. You can clone my form by following this guide: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL
Here's how I did it:
1. First, I added the Visual Multi Select widget.
2. I then added the following:
*Please check the screenshot for reference:
"Options selected" => Form calculation widget that will get all the selected items in your widget and output them as text.
"Option 1", "Option 2", "Option 3", "Option 4" => These are text boxes that will have calculation values on them.
"Calculation" => This is also a form calculation widget, this will be responsible in adding up all the text boxes.
3. In my "Options selected" field, I'll insert the "Visual Multi Select" widget here, I set the input type from "0-9" to "a-z".
This is what happens here, it outputs the selected item in a list like manner:
4. Now what we will do next is to assign calculation values in your text boxes. We will do this using conditional logic. Here's a guide about it: https://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic
Here's an example of my condition:
IF "Options selected" contains "Option 1 ($1)" THEN insert "1" in text box titled "Option 1".
5. Now do that same with the other text boxes, here's my complete list of conditions:
6. Now in my last field titled "Calculation" (which is a form calculation widget). I'll sum up all the text boxes:
Here's a guide to learn more about the form calculation widget: https://www.jotform.com/help/259-How-to-Perform-Calculation-in-the-Form
I hope that helps. Do let us know if that works for you.