We have been looking into this a bit and we have found that you can do this by using a Calculation and an extra Email field outside of the Repeating Section.
Start out with a normal Repeating Section and a normal Email Field inside of the Repeating Section.
This will only use the first Repeating Sections Email address, Item 1, and pull the email address out of the Repeating Section and place it into the Email address outside of the Repeating Section. You can then use this email address in the 'To' field in the Confirmation settings.
This is what the form will look like in the builder:
You will then be able to add the Email Calculation field to the Confirmation 'To' field:
There are a couple of ways to handle calculating subtotals for repeating sections:
If the form represents a true invoice and the subtotals represent money and nothing else, you can set the form up to use the built in payment features of Cognito Forms. When you mark fields as Collect Payment, they will automatically appear on receipt/invoice grouped by repeating section item. Choice, Currency, Yes/No and Price fields can all appear on this "invoice" and the Price field gives you complete control with the ability to calculate both the amounts and the description of each line item if you need this power. In this case you would not be collecting payment from them, so mark the form via Payment Settings as never requiring payment.
The other option is to use the powerful calculation capabilities in Cognito Forms to quickly calculate the subtotals. In the example above, you could add a Calculation field at the bottom of the form and use a calculation like =MyOrder.Sum(ItemTotal) or even =MyOrder.Sum(Product_Amount * Quantity) to calculate the total for the My Order repeating section. Remember set the Type to Currency for the Calculation field so it will be formatted correctly and allow you to use the value of this field in other calculations. You can learn more about these capabilities in our help documentation at: https://www.cognitoforms.com/support/51/calculations/repeating-sectionstables. Take a look at the section on Working with Repeating Sections.
Please mark this as the answer if it helps you make this work, or add a comment if it is not quite what you were looking for.
There are a couple of ways to handle this in Cognito Forms:
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:
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.
Best Answer
I'm a developer with Cognito Forms.
We have been looking into this a bit and we have found that you can do this by using a Calculation and an extra Email field outside of the Repeating Section.
Start out with a normal Repeating Section and a normal Email Field inside of the Repeating Section.
=RepeatingSection.Where(ItemNumber=1).Select(Email).First()
This will only use the first Repeating Sections Email address, Item 1, and pull the email address out of the Repeating Section and place it into the Email address outside of the Repeating Section. You can then use this email address in the 'To' field in the Confirmation settings.
This is what the form will look like in the builder:
You will then be able to add the Email Calculation field to the Confirmation 'To' field: