Place a html element in your form.
Paste this code into it after you make any adjustments needed for it to match your input names and item id's. The item id targets are what hides the inputs.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>var jQ = $.noConflict(true);
jQ(document).ready(function(){
// ver 2
jQ("#item3").css("display", "none");// Change #item3 to match your item id holding result1
jQ("#item4").css("display", "none"); // Change #item4 to match your item id holding result2
jQ("input[name='fild1'],input[name='fild2']").keyup(function(){
var fild1 = parseFloat(jQ("input[name='fild1']").val());
var fild2 = parseFloat(jQ("input[name='fild2']").val());
if(jQ.isNumeric(fild1) && jQ.isNumeric(fild2) && fild1 !='' && fild2 != '' ){
//var result1 = (((fild1+fild2 )-(fild1*0.04))/0.375).toFixed(2);
var result1 = Math.ceil((((fild1+fild2 )-(fild1*0.04))/0.375)*100)/100;
var result2 = 0;
jQ("input[name='result1']").val(result1);
if((fild1*0.05) <=8){
result2 = Math.floor((8/0.375)* 100) / 100;
}
else{
result2 = Math.floor(((fild1*0.05)/0.375)* 100) / 100;
}
jQ("input[name='result1']").val(result1);
jQ("input[name='result2']").val(result2);
}
else{
jQ("input[name='result1']").val('');
jQ("input[name='result2']").val('');
}
});
});</script>
I named my inputs fild1 and fild2 and
result1 and result2
The div item id's in my form containing the result inputs were item3 for result1 and item4 for result2.
Your form will probably have different id's for the div's holding the two result inputs. Look at your source code to determine this and change the code where commented.
You can change the other input targets to match your form if they are different from mine or just change the name of your inputs to match mine in the code.
Field 1 = fild1
Field 2 = fild2
Result 1 = result1
Result 2 = result2
if your inputs have different names adjust these jQ targets in the code to match your input names.
jQ("input[name='fild1']")
jQ("input[name='fild2']")
jQ("input[name='result1']")
jQ("input[name='result1']")
I adjusted my form to hide the two inputs and alert the two results.
You'll also need to remove the script wrapping the iframe code provided by the Form builder on export.