Add conditional calculations to form