6 Replies Latest reply on Mar 20, 2017 3:30 PM by sw777

    Calculating a total based on checkboxes and numeric fields

    sw777

      Hi all.

       

      I'm trying to display a "TotalFee" field that needs to return the fees for sitting some exams plus some optional tutorial sessions.

       

      I have two checkboxes called "Exam1" and "Exam2". Candidates can select either or both of these checkboxes.

       

      For each selected exam, a fee of $90 needs to be added to the total (so $180 if both boxes are checked). I'm thinking I need to use two hidden numeric fields with a preset value of 90 in each, and then refer to this field if the associated checkbox is selected (unless there is an easier way to do this).

       

      There is also a numeric field called "TutorialSessions" that allows the candidate to enter the number of tutorial support sessions they want to book into before they sit either exam. This is an optional field.

       

      If a number is entered in the "TutorialSessions" field, it needs to be multipled by 90 to obtain the total cost of tutorial support which is then displayed in a "TutorialFee" field.

       

      Finally, the "TotalFee" field needs to sum the total cost for the selected exams plus the tutorial fee.

       

      Any help would be greatly appreciated.