How can I create a total from a matrix and then update that value into a payment form?

  • Profile Image
    grrguitar98
    Asked on March 20, 2017 at 05:00 PM

    I have a hanging basket sale form, each flower basket is $16. I created a matrix that shows names of flower types and then the quantity of each flower to be purchased. Then I used the Form Calculation Widget to add up all the quantities of the flowers from the matrix for a Total Orders. I cannot get the calculator to add up the total number of flowers ordered. It seems the first row of the matrix is the 100s column, the second row 10s, and so on. So if you want 1 Fushia, 2 Impatiens, and 3 Geraniums, the Total Order shows 123 instead of 6.

    Secondly, I would like to take the Total Orders value and copy it into the payment form. I'm using PayPal and I have created one product that is $16 dollars. If a user orders 6 flowers then I would like the PayPal product to increase it's quantity to 6 on its own so that the person cannot lie about the order amount to save money. Thanks.

  • Profile Image
    EltonCris
    Answered on March 20, 2017 at 08:05 PM

    I fixed the form for you. Kindly check.

    Here's what I did.

    1. I added the matrix fields and multiplied it by 16 (your flower's based price) 

    2. I set your payment field to collect user-defined amount and then pick the calculation field from the list.

    You can also achieve this in the payment field alone since you can define quantity per product in the wizard. However, you can choose whichever solution you prefer. 

    Thanks!

  • Profile Image
    grrguitar98
    Answered on March 21, 2017 at 08:57 AM

    Thank you, this is what I was wanting. I added a condition to disable the payment form so the user cannot change the value in the PayPal field.

    I didn't like creating this in the payment field alone because when it was logged, all the basket orders for that person were put in one cell for an Excel document. This prohibited me from easily counting up the total amount of baskets per type after everyone has filled it out.

    Thanks again.