• Resolved roycegracie

    (@roycegracie)


    hi !
    i did not understood how to use this feture.

    i want to create just a two feilds conculator that will show
    1) number of hours – each one will be 3$
    2) number of KM, now the thing is that the first 50 KM needs to be at the price of 2$ each. and if the user types above “50” the price goes down to 1.5$

    can you please explain how can i do this ?

    thank you !

    https://wordpress.org/plugins/calculated-fields-form/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    I’m sorry for delay, I’ve not received the notification of your question.

    If you have a field for hours, for the explanation, I will call the field “fieldname1”, and a second field for KM, called “fieldname2”, the equation would be:

    fieldname1*3+fieldname2*( (fieldname2 < 50) ? 2 : 1.5 )

    Best regards.

    Thread Starter roycegracie

    (@roycegracie)

    well this worked for me:
    (fieldname2 * 19) + (fieldname6 < 50 ? fieldname6 * 99 : fieldname6 * 1.1)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Define dependencies’ is closed to new replies.