One field of form no longer being included in calculation
-
Hi,
I’ve been using the following formula successfully for the past few months, but I’ve just noticed yesterday that one of the fields is no longer being included in the calculation. Could this be the result of an update, as the formula has not changed?
Below is the formula, here is the live form, and the field that is no longer calculating is fieldname10 (the discount element):
(function(){ var n; if( fieldname7<=5000 ) { switch( fieldname8 ) { case 5: n=2; break; case 4: n=1.5; break; case 3: n=1; break; case 2: n=0.95; break; case 1: n=0.9; break; } } else if( fieldname7<=10000 ) { switch( fieldname8 ) { case 5: return "-> Contact us"; break; case 4: n=2; break; case 3: n=1.5; break; case 2: n=1; break; case 1: n=0.95; break; } } else if( fieldname7<=25000 ) { switch( fieldname8 ) { case 5: return "-> Contact us"; break; case 4: return "-> Contact us"; break; case 3: n=1.5; break; case 2: n=1; break; case 1: n=0.95; break; } } else if( fieldname7<=45000 ) { switch( fieldname8 ) { case 5: return "-> Not available"; break; case 4: return "-> Not available"; break; case 3: return "-> Contact us"; break; case 2: n=1.5; break; case 1: n=1; break; } } else { switch( fieldname8 ) { case 5: return "-> Not available"; break; case 4: return "-> Not available"; break; case 3: return "-> Contact us"; break; case 2: n=1.5; break; case 1: n=1; break; } } if( typeof n != "undefined" ) { return '£'+PREC((fieldname5*fieldname7*fieldname9+(fieldname7*fieldname17)*fieldname10)*n,2); } return ''; })()
https://www.ads-software.com/plugins/calculated-fields-form/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘One field of form no longer being included in calculation’ is closed to new replies.