Cognito-forms – How to calculate grand totals based on selected options in Cognito Forms

cognito-forms

Please help. I have created an order form that i need to add up for a quote after client selects features. I do not understand how to get this to work.

Best Answer

I believe I tracked down the form in question, so I can provide a couple of options to consider:

  1. Whether you are collecting payment online or not (since this is a quote) you can specify that you want to collect payment based on options selected. You can collect payment using Currency (user fills in), Price (constant or calculated amount), Choice (user picks options with associated prices), and Yes/No (price associated with Yes response). Here is an example using this approach with a choice field set to collect payment:

    enter image description here

  2. If the first automatic option does not meet your needs, you can add a Calculation field, set the Type to Currency, and enter a calculation to add up the amounts for each of the payment-related fields on the form. For Yes/No and Choice fields, a special property is available when writing calculations to let you know the total amount based on selections. You can see that this will show up as an auto-complete option when you are writing your calculations:

    enter image description here

    Using this approach, here is an example of a Total calculation that adds the amount of a Base Price field with the total selected amounts from an Options field:

    enter preformatted text here

    The calculation for the Total field in this example is =BasePrice + Options_Amount. You can do almost anything in calculations, including calculations that sum up values in repeating sections. For more information, check out our calculation help documentation.