I am trying to get this code to work using "if else statment" but it will only do the first part and not do the second part in the else statement. Can anyone help me out because I need to finish this today for work? Here is the code:
var R1 = this.getField("Registration Fees1");
var R2 = this.getField("Registration Fees2");
var R3 = this.getField("Registration Fees3");
var R4 = this.getField("Registration Fees4");
var R0 = 0
if (R0 == 0)
{
event.value = Math.floor(R1.value);
}
else
{
event.value = Math.floor(R2.value + R3.value + R4.value);
}
if (R0 == 0)
sometimes I can get the second part to work but not the first. I need it to do either or and this is getting frustrating. Any help would be greatly appreciated. Thanks in advance.