Three text boxes but only one required to be completed, if one completed the other 2 are optional
I have 3 text boxes all numerical values only, EXPRESS TOTAL, ECONOMY TOTAL & SP SVC, I would like at least one of these text boxes to be completed with a value greater than 0. If one box has information then the other 2 textboxes are not required to be completed
I started with the below as a custom calculation script for each of the text boxes but am unsure if i am doing this correctly
Also should the form when opened have all these text boxes as required ticked at source and only when one of these 3 text boxes is completed with a value greater than 0 the required state for the other 2 textboxes will be removed
var aF = ["ECONOMY TOTAL", "SP SVC"]; var sf = this.getField("EXPRESS TOTAL"); for (var i = 0; i < aF.length; i++) { var v = this.getField(aF).value; if (v !== "") { this.getField("last 4 digits").required break; } }
but have to admit got lost as to the best way of achieving what i want
