• Hello,

    I have just discovered this great plugin and am right now transferring my cost calculator from the old plugin to forminator.

    One thing I am missing though, is to add conditional logic to calculations. With my old plugin this was possible through the ternary operator and as I’ve read, the suggestions from the devs of forminator are to create additional calculation fields. But I have a calculation with 14 conditions, which makes it a ton of work, which could be easily done in some lines of code and minutes of time.

    Kindly want to request you to add this feature.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @raumzeit

    I hope you are doing well.

    I am afraid it would require different calculation fields, but could you explain your formula and conditionals so we can take a closer look at the best approach?

    Best Regards
    Patrick Freitas

    Thread Starter raumzeit

    (@raumzeit)

    Thank you for your reply.

    One of my calculations is the price of hosting, which differs depending on what type of website it is. So the client first selects the website-type (standart or e-commerce) and then is asked, whether there is an existing hosting.

    I gave a value to each of the website types and multiplied that with either the value 1 or 0, given there is no hosting or there is one respectively, which results in the correct costs for the hosting, but there is a “configuration price” issue, which is dependent on the website-type. It is a one time payment, so I thought of just adding this to the total calculation but since it is dependent on the website-type, I don’t know how to do it.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @raumzeit

    Thanks for response!

    I’m still not quite sure what would be correct calculation. Do you think you could give just “real life example” in response (feel free to use fake values, it’s just about actual calculation formulae)?

    Or better yet, maybe we could see/test the “old” form somewhere to see how it worked so far?

    Best regards,
    Adam

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conditional logic in calculations’ is closed to new replies.