Gravity forms allows for basic field calculations using merge tags, such as {Field 1:1} * {Field 2:2}
, but I would like to use if/and/else statements to set a field value such as:
if (and ({Field 1:1} = 200,{Field 2:2} = 1), 100, if (and ({Field 1:1} = 200,{Field 2:2} = 2), 150, if (and ({Field 1:1} = 200,{Field 2:2} > 2), 200, 0)))
or in other words:
if (field_1 = 200) {
if (field_2 = 1) {
field_3 = 100
} else if (field_2 = 2) {
field_3 = 150
} else {
field_3 = 200
}
Hoping someone can give me some idea of how to include this kind of calculation in Gravity Forms.
FYI: Here is the form I am working on. I hope to use formulas instead of 21 different variations of the 'Course 1 week 1 topup' conditional field which appears only when course 1 and week 1 are selected.
Thanks!