Updating from 1.0.2 to 1.0.4
-
Firstly, many thanks for the version updates. This will really help us Calculated Field Form users who also have the Wordfence security plugin installed.
I have a problem with the update from 1.0.2 -> 1.0.4, which may be specific to the custom code I am using. When I update to 1.0.4, I get no final value output in the calculated field using the custom code, but the other template forms (e.g. Ideal Weight Calculator) are working fine. Is there anything in my formula which might be conflicting with the code in version 1.0.4 ?:
(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*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 ‘Updating from 1.0.2 to 1.0.4’ is closed to new replies.