• Resolved ricchezza

    (@ricchezza)


    Hey guys! Thanks for your great plugin! One question though: in my form i have a dropdown that allows to select an alloy for my jewelry to be calculated. And i want the price without gems to be dependent from the alloy dropdown. So say you select Gold 585 and A price without gems automatically = total weight * xxxx (usd) per gramm, and when you select Platinum 950, price without gems is automatically recalculated. I beleive it is actually possible with “IF” logical operator but i am a noob in coding)))) Thanks for all the help!

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

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

    (@codepeople)

    Hello,

    If the values of the choices in the fieldname12 field are the prices per gram depending of metal, the equation would be as simple as:

    fieldname12*fieldname8

    Best regards.

    Thread Starter ricchezza

    (@ricchezza)

    Oh my god. Im so f**ing stupid…Thank you buddy)))) Actually forgot that i can actually put the values, not only the names )))

    Thread Starter ricchezza

    (@ricchezza)

    Disregard my last: actually i already use values in filedname12 to determine the total weight. So i kind of need a second value for each metal alloy

    Plugin Author codepeople

    (@codepeople)

    Hello,

    You simply should create a new hidden field with the price of each metal, and define them as dependent of the corresponding choice in the DropDown field (https://cff.dwbooster.com/documentation#dependencies).

    You simply should know that the values of the dependent fields that are inactive is zero.

    So, assuming that the fields’ names of these hidden fields are:

    fieldname123, fieldname124, fieldname125, fieldname126

    The equation would be:

    fieldname12*(fieldname123+fieldname124+fieldname125+fieldname126)*fieldname8

    Best regards.

    Thread Starter ricchezza

    (@ricchezza)

    ummm not sure if i catch the idea. Do i have to open the dependencies and put my prices for each metal alloy there? And how do i create a hidden field?

    p.s. let me know if i can donate to you guys in any way.

    • This reply was modified 6 years, 10 months ago by ricchezza.
    Thread Starter ricchezza

    (@ricchezza)

    ohhhh i think i got the idea…i will try right now..

    Plugin Author codepeople

    (@codepeople)

    Hello,

    You are creating a new hidden field for each choice in the dropdown field with the price for the corresponding metal, and you are defining these fields as dependent of the DropDown choices, so, you can use these hidden fields in the equation, without worry for the choice selected, because the plugin manages the values of the dependent fields that are inactive as zero.

    If you need additional help implementing your project, we can offer you a custom coding service from my private website:

    https://cff.dwbooster.com/customization

    Best regards.

    Thread Starter ricchezza

    (@ricchezza)

    Got everything working like magic. Thank you friends!)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Need help with equation ((’ is closed to new replies.