I need help with calculations with condition for a matrix

  • Profile Image
    Karlene MacDonald
    Asked on January 20, 2017 at 08:55 PM

    I am creating a registration form for our local skating club.  Registrants can choose from a number of programs (CanSkate, Pre-Power / Power, Adult Learn, StarSkate Primary, StarSkate Intermediate, and StarSkate Senior).   They can also register for up various day options.

     

    With respect to Adult Learn, they can only choose 1-day and it cost $300.  How do I restrict the matrix to choose only one day for Adult Learn and to calculate a cost of $300.  This applies to Pre-Power / Power.

     

    With respect to CanSkate, they can choose up to two days.  If they choose 1-day, the cost is $300 and if they choose 2-days, the cost is $550.  If they choose Primary CanSkate, they can only choose two days again, but one day is $725 and two days is $725.

     

    If they choose Intermediate, they can choose up to three days.   If they choose 1-day the cost is $750, two days is $1,000, and three days is $1,225.  Senior can do three days but 1-day is $825, 2-days is $1,125, and 3-days is $1,400.

     

    I want the total to show up in a cell for the registrant to see.

     

    Can you please help me????

  • Profile Image
    AIDAN
    Answered on January 21, 2017 at 07:28 AM

    Hi Karlene, thank you for contacting us.

    Upon analysis of what you would like to achieve, and examination of the matrix widget, I do not see any way to configure this widget to match your needs, because for example we cannot restrict the matrix to allow one selection in one case, and two selections in another case, and so on.

    What I would recommend for your use case is to simply:

    1. Create a series of checkbox elements, each checkbox would be about one of the programs, with the days being the options of the checkbox.

    2. Setting the limit of how many options we can select in each of these checkbox elements, depending on the program (Adult Learn would have 0 minimum and 1 maximum, CanSkate would have 0 minimum and 2 maximum, and so on).

    3. Creating a field that would contain the calculation result of the checkbox selections, meaning the total that you want the registrant to see.

    Would that work for you?