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

    How to add a conditional price based on a calculation?

    Asked by Rucker on February 11, 2016 at 09:44 PM

    Hi, I see that an auto-calculation feature was added to your Use Cases document in 2010. Is it available yet? I would like to have a conditional price calculation like the following:

    1. Rug Width (in feet): 8

    2. Rug Length (in feet): 10

    3. Rug Knot Density (in knots per square inch): 30 = $60/ft^2 OR 100 = $80/ft^2

     

    Price = $4,800 (8ft x 10ft x $60/ft^2) if 30 is entered for Knot Density

    OR

    Price = $6,400 (8ft x 10ft x $80/ft^2) if 100 is entered for Knot Density

  • Profile Image
    JotForm Support

    Answered by Chriistian on February 11, 2016 at 09:50 PM

    You can do calculations in your form using the Form Calculation Widget.

    Please follow the guide below to set up the form calculation.

    1. Add 4 textbox fields that will capture the amount entered.

    2. Add the Form Calculation widget, then click on the Wand Icon to open the calculation wizard.

    3. On the calculation wizard, add the required fields to perform the calculation. (rugDensity * rugLength * initalPrice)

    Follow the guide below to add the fields. Then click Finish when done.

    4. Now you can now add the conditions required for the price. Here's a guide about smart conditions that can help: Smart Forms Using Conditional Logic

    5. Add the following conditions to your form using the Update/Calculate Field.

    Condition 1: If Rug Knot Density is Equal to 30, output 60 to Initial Price.

    Condition 2: If Rug Knot Density is Equal to 100, output 80 to Initial Price.

    Click the Save button to save the conditions.

    6. The conditions should look like this.

     

    Once that is set, your form is ready for calculation. Here's a gif of the form performing the calculation.

     

    Here's the link to the sample form: https://form.jotform.com/60418190598967 You can clone it to your account by following this guide: How to Clone an Existing Form from a URL

     

    Do let us know if you need further assistance.