Multiply Multiple Fields by One Value

  • Profile Image
    hollywoodlights
    Asked on January 25, 2018 at 05:34 PM

    Hello,


    I have an order form created for events that my company does. On the order form, I'd like to somehow create a condition or calculation that will multiply the value of multiple fields by the value of one other field. 


    For example: We rent macbooks for customers who need to use them at an event. The base price for one day of renting the macbook is $180. However, depending on how many days the customer needs the macbook for (typically the duration of the event), that price will need to multiply or triple. 


    The event I'm trying to create this form for is 3 days long, therefore, I need ALL the purchase options underneath both the "Video" and "Audio" categories to multiply the "Pre-Order" or "Standard" price by 3, and have that amount be what the customer sees on their end when accessing our form. Right now, I have just the base price entered into each of the pricing fields. But, I'd like to be able to input a number somewhere that will tell each of the pricing fields under "Video" and "Audio" to multiply by that number.


    I hope I've explained this in a way that makes sense. Your assistance is appreciated.


    Please assist. 

  • Profile Image
    Kevin_G
    Answered on January 25, 2018 at 07:37 PM

    Yes, it's possible to perform such calculations on Jotform, you may indeed capture the values of the selected options and perform a calculation with fixed values. 

    Please check the following guides that will help you doing so: 

    https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget

    https://www.jotform.com/help/301-How-to-Assign-Calculation-Value

    https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field

    The guides will also help you passing the calculated amount to the payment field. 

    If you have questions, let us know. 

  • Profile Image
    Jed_C
    Answered on February 12, 2018 at 05:28 PM

    You can use the form calculation widget to get all the input values of the fields and multiply it with the multiplier field.

    Here's a sample formula:

    (Field 1 + Field 2) * Multiplier

    1518474186calc_formulat.png

    That formula will only go into your "Total" field. No need to add formula for each individual field. Your "Total" will already capture the value input in those fields added in that formula.

    Basically, you can add as many fields as you like, you'll just have to add those fields inside the () in the formula window in my sample screenshot above.

    1518474340sample_computation.gif

    Please let me know if this is not the computation that you are looking for.