Conditional values for insurance quote
-
Hello.
Great plugin. I would like to create a relatively simple travel insurance quote calculator.
fieldname5 is Number of days
fieldname9 is Number of insuredThe quote should work out the following:
If the number of travel days is between 1 and 7 then the cost is $270 * the number of insured.
If the number of travel days is between 8 and 15 then the cost is $570 * the number of insured.
If the number of travel days is between 16 and 31 then the cost is $570 * the number of insured.
and so on..
I am using this formula but it is not returning the correct results.
(function(){
if(fieldname5 <= 7) return 270*fieldname9;
if(fieldname5 >=8 <=15) return 570*fieldname9;
if(fieldname5 >=16 <=31) return 940*fieldname9;})();
Where have I gone wrong?
Thanks in advance.
- The topic ‘Conditional values for insurance quote’ is closed to new replies.