How can I apply calculation formulas to an input table using dropdown type?

  • Rdiz
    Asked on June 8, 2020 at 7:59 AM

    I´m trying to set a simple add formula but using the dropdown type and setting a value depending on the response, can you help me?

    I´m attaching my form, I want to have adding formula in every input table and as well as adding all the totals.


    Thanks in advance.

  • shiro.ophal
    Replied on June 8, 2020 at 8:40 AM

    Hello!


    You can do this with a simple calculation widget. It is a bit tedious to set up, but it will calculate everything automatically. In the calculation widget you've already set up, click "Add Field" then choose the dropdown question title (in this example "Resaca friendly. Elije tu preferida."):

    How can I apply calculation formulas to an input table using dropdown type? Image 1 Screenshot 80

    Then choose one of the options to calculate a price on:

    How can I apply calculation formulas to an input table using dropdown type? Image 2 Screenshot 91

    Multiply this by the individual price of each item (in this example, 15):

    How can I apply calculation formulas to an input table using dropdown type? Image 3 Screenshot 102

    You can then repeat these steps for each item, adding them together:

    How can I apply calculation formulas to an input table using dropdown type? Image 4 Screenshot 113

    This also works for the other dropdown menus below this one. In order to avoid having one calculation widget with a very long equation, I would recommend adding temporary ones which you can hide (or show to the customer as subtotals for each section):

    How can I apply calculation formulas to an input table using dropdown type? Image 5 Screenshot 124

    Change the final calculation widget to add those temporary ones instead:

    How can I apply calculation formulas to an input table using dropdown type? Image 6 Screenshot 135

    And finally, add a final calculation form before payment method selection to sum all the intermediary ones:

    How can I apply calculation formulas to an input table using dropdown type? Image 7 Screenshot 146

  • Richie JotForm Support
    Replied on June 8, 2020 at 10:26 AM

    Thank you shiro.ophal for the great instruction.

    Hello Rdiz, if you have further questions, let us know.

  • Rdiz
    Replied on June 9, 2020 at 12:50 PM

    Thank you very much!, All my questiones were answered and now I can finish my form. 


    Regards!