Multiply Multiple Fields by One Value

  • hollywoodlights
    Asked on January 25, 2018 at 5: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. 

  • Kevin Support Team Lead
    Replied on January 25, 2018 at 7: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. 

  • hollywoodlights
    Replied on February 12, 2018 at 3:42 PM

    Neither of those articles seem to accomplish what I'm looking for. It seems that they explain how to calculate 1 value by 1 value. I need to calculate 10+ values by 1 value. 

    Basically, if an event is going to last 3 days, I want to be able to enter in the number "3" somewhere on my form, and have 20 fields multiply by that number (3). I don't see how this is possible using the links you provided. 

    Please explain further.

  • Jed_C
    Replied on February 12, 2018 at 5: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 Screenshot 10

    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 Screenshot 21

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