• Resolved pdsurtees

    (@pdsurtees)


    Hi. I wonder if you can help me with a novice question. I’m trying to use a manual formula in a Caldera forms, but my Javascript skills are not good.
    I have a form with the following fields
    Unit Price for under 10 items
    Unit Price for Over 10 items
    Quantity Required
    Total Price
    Total Price Discounted

    My Formula for Total Price is……..%unit_price_for_under_10_items% * %quantity_required%
    This works fine ( I realise that I could have used Operator Groups to do this, but I’m just exploring the software).
    My formula for Total Price Discounted is…….
    if (%quantity_required%>10%) {unit_price_for_over_10_items% * %quantity_required%}
    else {unit_price_for_under_10_items% * %quantity_required%}
    This doesn’t work and just returns a blank value when I preview the form. I have 2 questions
    1. Is it possible to use <if> statements in manual formulae like this, or is there a better way to achieve the same thing?
    2. If it is possible, could you tell me what the correct syntax for my Total Price Discounted formula should be?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using If statements in a Caldera Forms Manual Formula’ is closed to new replies.