In my form, I would like to do the following: https://www.cognitoforms.com/NMA3/Intitulado
In the field "ALIMENTOS Y BEBIDAS" (ALIMYBEB) I have several products, each with a value (1 or 2) and a price.
Now, what I want to do is to calculate and to show the cost of the selected products according to the following rule: if the value of the product is 1, then the price is calculated as number of 'invitados' times the price of the product, if the product is 2, then the price is the same as the price of the product. At the end, the subtotal will show the sum of all the prices (according to the mentioned rules).
I am using the following calculation field:
=(If ALIMYBEB_Value = 1 then ALIMYBEB_Price * Invitados else ALIMYBEB_Price)
However, it does strange/wrong things.
Can you help me?