How would you script the following:
An order form, with a calculated field - "TotalCost", to which you want to apply a surcharge percentage if a checkbox is checked. I can create it with a user entered field, but haven't been able to get it to work with a calculated field.
This is the script I have come up with to add 15% to a total (in the click event for the checkbox):
if (this.rawValue == "1")
TotalCost.rawValue *= 1.15;
else
TotalCost.rawValue /= 1.15;
Works fine for user-entered values, not at all for calculated data.