Custom calculation to sum or allow text
I'm creating a form and would like to have a field that either calculates the sum of three previous fields, or allows the user to type text. Specifically, each row has breakfast, lunch, dinner, and total fields. In the total field I would like the sum of breakfast, lunch, and dinner OR allow the user to type an amount. I'm modeling off an old form that has the below in the custom calculation script. It works on the old form, but not the new one. The new form doesn't sum the fields and only allows text entry. Help please 🙂
var B = this.getField("BREAKFASTRow1").value;
if(B>0) event.vaule = Calcs();
var L = this.getField("LUNCHRow1").value;
if(L>0) event.vaule = Calcs();
var D = this.getField("DINNERRow1").value;
if(D>0) event.vaule = Calcs();
