select an option or perform a calculation
I have a form that has spots for first floor and second floor elevations for a house. Unfortunately not all of the houses have a second floor. Is there a way that I can prompt the user to ask if there is a second floor and if not have it place N/A in the box and if so have it add 9 feet to the first floor. The form is set up so everything is calculated off of the Highest adjacent grade and split between different boxes for the integer and decimal.
the code for the first floor calculation is
var num = this.getField("HAG").value + this.getField("HAGdec").value/10 + 2;
var strNum = util.printf("%0.1f",num);
var aNum = strNum.split(".");
event.value = aNum[0];
this.getField("FirstFloordec").value = aNum[1];
I'm assuming second floor would be
var num = this.getField("HAG").value + this.getField("HAGdec").value/10 + 11;
var strNum = util.printf("%0.1f",num);
var aNum = strNum.split(".");
event.value = aNum[0];
this.getField("SecondFloordec").value = aNum[1];
plus whatever is necessary for allowing the user to choose N/A
