I have a form which asks whether a registrant is requesting vegetarian meal(s). If the answer is yes, then 3 number fields appear asking how many meals for adults, older children, and younger children. If the registrant checks "yes" to request vegetarian meals but then doesn't modify any of the 3 number fields, I want the form to prompt the registrant to choose a non-zero number in at least 1 of those 3 number fields. So I've created a number field (id 39) in the form (id 12) which totals the 3 number fields, and added the following code to functions.php
But it doesn't generate an error message if I leave all the 3 number fields as zero. What am I missing?