Home › Forums › Quform WordPress › Showing fields based on field values › Reply To: Showing fields based on field values
hi ally,
i have an input field with numeric value in order to calculate a result. I want to show a preset value if the input field receive a number less than 50. here the code but doesn’t work. any suggest ?
var val8 = $(‘.quform-field-9_4’).val();
if (val8 && val8.length && $.isNumeric(val8))
var val9 = $(‘.quform-field-9_5’).val();
if (val9 && val9.length && $.isNumeric(val9)) {
totaldeskcasslite += parseFloat(val8) * parseFloat(val9) * 0.012;
totaldeskcassmed += parseFloat(val8) * parseFloat(val9) * 0.015;
totaldeskcasshigh += parseFloat(val8) * parseFloat(val9) * 0.020;
}
else if (val9 && val9.length && $.isNumeric(val9) < 50) {
totaldeskcasslite += 50;
totaldeskcassmed += 70;
totaldeskcasshigh += 100;
}
thanks