IF/conditional statement statement with math included

By: ac f | Asked: 01/10/2025
ForumsCategory: General questionsIF/conditional statement statement with math included
ac f asked 1 month ago

Hi, I am trying to set up my form so that the window's height and width fields are multiplied together, then multiplied by 0.15. Additionally, if the "Double Hose" option in the section below is selected, I want to add 25 to the result. If the "Double Hose" option is not selected, no additional value should be added. I’ve tried implementing this using a text field and also through the HTML section of the form, but neither approach is working. I consistently receive an error related to the if statement. Even when I attempt a basic conditional test, such as: [if 955 equals="Double Hose AC Unit"] Hello World [/if 955]
I still get the same if error. Here is the full code I’m trying to use, but it’s not working:[if 955 equals="Double Hose AC Unit" ] (([957]*[958])*0.15) + 25 : (([957]*[958])*0.15)[/if 955]

Attachments
Question Tags:
Joshua Hebbel replied 3 weeks ago

You get this figured out? Im having a similar issue applying logic to a selection

Rob LeVineRob LeVine Staff replied 3 weeks ago

My comment below still holds. If you're doing this in a form, the syntax in the original post is not correct.

Joshua Hebbel replied 3 weeks ago

mind helping out? looks to be exactly what the directions here say (https://formidableforms.com/knowledgebase/conditionals/#kb-equals)

Rob LeVineRob LeVine Staff replied 3 weeks ago

Provide detailed screenshots of what you're trying to do and what code you have.

1 Answers
Rob LeVineRob LeVine Staff answered 1 month ago

I suggest reading the page on conditional calculations where you'll see the correct syntax - https://formidableforms.com/knowledgebase/field-calculations/conditional-calculations/

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