if a field is blank, allow user input in another field?
I have three fields, "OvertimeHrs", "OvertimeAmount" and "TotalPay".
OvertimeHrs is for user input and not calculated
OvertimeAmount is calculated by multiplying OvertimeHrs times a specific number, and is working:
var v1 = this.getField("OvertimeHrs").value;
event.value = 30 * v1;
TotalPay is calculated by adding OvertimeAmount to a specific number, and is also working:
var v2 = this.getField("OvertimeAmount").value;
event.value = 15 + v2;
Now I would like to edit the code, but I don't know the syntax. If the OvertimeHrs field is blank, I would like to have the other two fields to be empty and allow regular user input. So in OvertimeAmount, it would something like:
if OvertimeHrs is not blank, do the calculation, else do nothing (leave box empty, no zero or anything)
And in TotalPay, if OvertimeHrs is not blank, do the calculation, else do not calculate and allow user input.
Is this possible, and if so could anyone tell me what the syntax would be for that? Thank you for your help!
