Adobe Acrobat Pro Dc Custom calculation script add multiple fields depending on what number is entered into another field
I am creating a form in which the user enters the Total number of travelers "NumbTravTot" from 1 through 4.
I also have 3 separate field titled "TotMeal1", "TotMeal2" and "TotMeal3".
I need to create 4 separate fields for each traveler that if the "NumbTravTot" field = a certain number, the respective traveler field will add all 3 of the "TotMeal1", "TotMeal2" and "TotMeal3" together and show that total amount.
If the "NumbTravTot" field is a "1", then only the lower field for Traveler 1 "TotalMealTrav1" will populate the added amounts. The other 3 traveler fields will state: "$0.00".
If the "NumbTravTot" field is a 2, then both the lower fields for Traveler 1 "TotalMealTrav1" and Traveler 2 "TotalMealTrav2" will populate with the added amounts (showing the same total for both). The remaining Traveler Fields will show "$0.00".
The remaining "TotalMealTrav3" and "TotalMealTrav4" fields will follow suit depending on if a 3 or a 4 is entered into the "NumbTravTot".
