Conditional calculation

By: Jeff Miller | Asked: 04/15/2024
ForumsCategory: General questionsConditional calculation
Jeff Miller asked 7 months ago
Field 136 contains one of 4 words: Classic, Bold, Slimline, or Eco. I am trying to set up a calculation in which if the word Classic is in Field 136, then the word Classic has a value of 120, and I want to multiply 120 times whatever value is in Field 99. Classic value is 120
Bold has a value of 145
Slimline value is 160
Eco value is 50.   The calculation below is not working. Would anyone know if this is possible?   ([136] == Classic) ? (120 * [99]) : ([136] == Bold) ? (145 * [99]) : ([136] == Slimline) ? (160 * [99]) : ([136] == Eco) ? (50 * [99])  

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right