[Resolved] How to use the condition "IF"
First of all, terrific plugin! I love it, thanks for it, im even considering buying it. Im very new to using it still so im a little confused. Im trying to get the condition IF to work, but i cant do it. I tried looking up at http://wordpress.dwbooster.com/forms/calculated-fields-form but could not find my answer.
I have two different BMR formulas, one for males and one for females, both very different. It’d be possible to incorporate it into just 1 calculator if i could use the IF condition but i dont know how to do it, this is what i thought would work but did not:
IF(fieldname5=men, 66 + (6.23*fieldname3) +(12.7*fieldname2) – (6.8*fieldname4), IF(fieldname5=women, 655 + (4.35*fieldname3) + (4.7*fieldname2) – (4.7*fieldname4)))
Ill write what the fieldname means so you can understand it better:
Fieldname5=sex, fieldname3=weight, fieldname2=height, fieldname4=age
Thanks a lot!
This are the formulas:
*Men: BMR = 66 + ( 6.23 x weight in pounds ) + ( 12.7 x height in inches ) – ( 6.8 x age in years )
*Women: BMR = 655 + ( 4.35 x weight in pounds ) + ( 4.7 x height in inches ) – ( 4.7 x age in years )
- The topic ‘[Resolved] How to use the condition "IF"’ is closed to new replies.