Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter 1147249

    (@notdgs)

    Thanks Ben.

    I added the idea on your website. Hopefully, it will get implemented. ??

    Peter

    Thread Starter 1147249

    (@notdgs)

    Hi, I sent you the link via your web form a moment ago.

    Thread Starter 1147249

    (@notdgs)

    Thanks for the clarification. In the equation I actually used the correct syntax, just as you described it.

    The problem remains, though… ??

    What I don’t know is how to put the first function / calculation inside the second function, instead of the placeholder text ***HOW DO I PUT ALL OF THE ABOVE HERE?***

    I’m not sure that I’m making this clear enough. I want to override the original calculation if one of two check boxes is checked.

    I haven’t found a way to do that.

    Thread Starter 1147249

    (@notdgs)

    Thank you for the prompt response.

    Yes, I got this far. But my problem is that the original equation is more complex. There are three if statements there. And I’m not sure whether it is possible to use some kind of nesting in your plugin.

    The orig equation for fieldname2 goes like this:

    (function(){
    IF ((fieldname1>0) and (fieldname1<=10)) return fieldname1*200;
    IF ((fieldname1>10) and (fieldname1<=50)) return fieldname1*150;
    IF ((fieldname1>50) and (fieldname1<=100)) return fieldname1*100;
    })();

    The actual calculation is more complex, but you get the idea.

    So how do I put this code together with your

    (function(){
    IF(fieldname3) return fieldname1*100;
    return ***HOW DO I PUT ALL OF THE ABOVE HERE?***;
    })()

    I was able to solve this by creating two price totals and hiding one or the other. But for that I used a drop down field, not two check boxes.

Viewing 4 replies - 1 through 4 (of 4 total)