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.


  • Profile Image

    weird behaviour on condition wizard add field calculation

    Asked by alpgulden on March 02, 2015 at 04:55 PM

    Here is what I am trying to do I am seeing weird values. I have check box and total field. When Check box is selected I am trying add 15 (number) to total.  The way I tried to do is using Add field option. But instead of 15 I am seeing 150. This is super simple calculation and frustration not to accomplish such simple task.

    please help.

    Page URL:
    http://www.jotform.com//?formID=50371871996164

    Screenshot
    condition wizard add field check selected and
  • Profile Image
    JotForm Support

    Answered by david on March 02, 2015 at 06:18 PM

    Hi,

    Rather than using the conditions, I would recommend using the calculation widget.  This will allow you to assign calculation values to your checkboxes and then forward those values to the widget:

    http://www.jotform.com/help/259-How-to-perform-calculation-in-the-form

    You had already added calculation values to a few of your fields:

    You would need to add a value to each one of you fields.

    After that, using the calculation widget, you can simply add up all the fields:

    I also need to remove all the conditions you were using to try to do the calculation.  You don't need to insert the values, the calculation widget will add up their associated calculation values.

    Here is my test form to show you how it works:

    http://support.jotform.com/form/50607499965976

    http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

    For most of the fields I just entered 15 for the calculation value.  You can set the value to whatever you'd like.  For instance, you'll notice when "Grup J : Dugun pastasi (WEDDINGS CAKE)" is selected, it adds 50 to the total.

    I hope I made things a bit more clear.  Let us know if you have any further questions and we will be happy to help.

  • Profile Image

    Answered by alpgulden on March 02, 2015 at 08:15 PM

    Thanks for the quick respond. I can use the calculation widget but I have to use the condition. Because I only want to add them in to total when they are selected. Please advice.

  • Profile Image
    JotForm Support

    Answered by ashwin_d on March 03, 2015 at 12:00 AM

    Hello alpgulden,

    The solution suggested by my colleague will work best for you. The amount will not be added in total if they are not selected.

    If you add conditions to add total, it will further complicate your conditions. You will have to add several condition to insert values based on the selection.

    Do get back to us if you still want to use the conditions, we will do the needful in a cloned form.

    We will wait for your response.

    Thank you!