• Resolved radu88

    (@radu88)


    Hey!

    First of all, Happy New year!

    I’d like your help to customize our calculated fields. Please check our page. We have the following flow:

    What is your expected retail price? – fieldname7. This is a currency field and it has the value of “175” predefined and user can change it.

    What is your VIP early bird discount? – fieldname75. This is a number field and it’s set to percentage and has the value of “40” predefined and the user can change it.

    Both fields work ok as expected.

    Starting VIP early bird price: – fieldname16. This is currency field and it has the value of “500” predefined and the user can change it.

    Ideally, fieldname16 would have a placeholder of fieldname7 – fieldname16%.

    Example – if the user fills in 1000 at the retail price (fieldname 16) and a 40% discount for early bird (fieldname75), the starting vip early bird price field (fieldname 16) would populate automatically with 600 unless the user changes it to something else – can this be possible?

    Thank you!

    The page I need help with: [log in to see the link]

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

    (@codepeople)

    Hello @radu88

    Thank you very much for using our plugin.

    If you want to prefill the fieldname123 as the fieldname75 percent of the fieldname16 value, you can use a calculated field for fieldname123 and configure it as follows:

    • Untick the “Read only” checkbox.
    • Tick the “If value entered manually, no evaluate equation” checkbox.
    • Tick the “If editable, format dynamically” checkbox.
    • Finally, enter the equation:
    fieldname16*(1-fieldname75/100)

    Best regards.

    Thread Starter radu88

    (@radu88)

    Hey!

    Thanks for the reply. Unfortunately, it’s not working as expected. I created a new calculated field and configured it as per your instructions and I get this – https://prnt.sc/e7ap0yXaswwJ

    If I tweak your equation to this:

    fieldname7*(1-fieldname75/100)

    I then get this – https://prnt.sc/cjbai1VJi8z1 – which in actual math, the equation would be:

    fieldname7 * (1 – fieldname75/100)= 1000 * (1 – 40/100) = 1000 * (1 – 0.4) = 1000 * 0.6 = 600. The correct answer should be 600 but as you can see from the screenshot, it’s actually 996

    What am I doing wrong? basically, the new calculated field should display the difference between fieldname7 minus fieldname75 which is a percentage field.

    Thank you!

    Plugin Author codepeople

    (@codepeople)

    Hello @radu88

    If you select the percent option as the field’s type in the fieldname75 settings, the plugin transforms its value into a decimal by itself, and you should not divide it by 100.

    So, the equation would be:

    fieldname7*(1-fieldname75)

    Best regards.

    Thread Starter radu88

    (@radu88)

    Perfect, works now, thank you so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Predefined value’ is closed to new replies.