Cognito-forms – Repeating section in Cognito Forms with variable costs

cognito-forms

I am creating a form to sign up members to a summer camp. I have set up a repeating section, so if parents have more then one child attending they don't have to start from scratch. My problem is that it cost $60 for the first kid and $30 for each additional kid. I know I can do a drop down menu to ask the cost for each kid, but I rather it automatically calculate the costs to eliminate errors.

I can't figure how to do a conditional to know that "camper 1" has been added ($60) and to only charge $30 each for additional camper ie "camper 2" , "camper 3" etc. The cost should be $120 for three campers.

Best Answer

There are a couple of ways to handle this in Cognito Forms:

  1. Include the camper registration fee of $60 for each camper as part of the repeating section. Then add a Price field for the multi-camper discount below the repeating section, using a calculation like =Campers.Count() > 1 ? (Campers.Count() - 1) * -30 : 0. You can hide this Price field or make it only appear when the discount is not zero. This would produce a receipt like:

    Camper 1   
        James Philips        $60.00 
    Camper 2   
        John Cartin          $60.00 
    Camper 3 
        Parker Owens         $60.00
    Multi-Camper Discount   ($60.00)
    --------------------------------
    Subtotal                $120.00
    
  2. You could also charge $30 for each camper and have a separate $30 registration fee that applies to each application. I definitely prefer the first option since it clearly identifies the discount on the receipt.

Long term, it sounds like you would benefit from being able to use the Index of the item in the repeating section within calculations. We are looking at ways to make additional information like this available to calculations. In the mean time, hopefully these suggestions will meet your needs.