WordPress.org

Forums

Calculated Fields Form
[resolved] Define dependencies (3 posts)

  1. roycegracie
    Member
    Posted 1 year ago #

    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/

  2. codepeople
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. roycegracie
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Calculated Fields Form
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.