1147249
Forum Replies Created
-
Forum: Plugins
In reply to: [Timely All-in-One Events Calendar] Posterboard view month by monthThanks Ben.
I added the idea on your website. Hopefully, it will get implemented. ??
Peter
Forum: Plugins
In reply to: [Calculated Fields Form] use checkboxes to override calculationHi, I sent you the link via your web form a moment ago.
Forum: Plugins
In reply to: [Calculated Fields Form] use checkboxes to override calculationThanks 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.
Forum: Plugins
In reply to: [Calculated Fields Form] use checkboxes to override calculationThank 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.