Send content of "repeater area" via e-mail

Send all forms from a repeater area via email.

Overview

The issue occurs because field names in the repeater area are incorrectly formatted, causing only the last form's data to be captured.
Use the correct naming convention for repeater fields and configure a Loop action to process and include all data in the email body.

Answered
ChronoForms v6
da davboc 03 Apr, 2019
Hi all,

I'm a newbie and I'm looking for a solution that when I press the "submit" button I send all the forms compiled in the repeater area via email.
I tried with default options, but I receive only the last form added in repeater area. I'd like to receive all the forms filled via mail. Is there an easy solution for that?

Thanks in advance for the help

Regards,
Davide
he healyhatman 03 Apr, 2019
What have you named the fields in your repeater area?
he healyhatman 03 Apr, 2019
1 Likes
What have you named the fields in your repeater area?
da davboc 04 Apr, 2019
Hi healyhatman, thanks for the answer.

In the repeater area I created a multifield area, and the fields are named as:

Name {var:area_repeater2.key}
and
Qty {var:area_repeater2.key}

what's wrong?

Thanks
he healyhatman 04 Apr, 2019
1 Likes
The space is very wrong, but generally the recommendation is

group[{var:area_repeater#.key}][field]

So you might have

product[{var:area_repeater2.key}][name]
and
product[{var:area_repeater2.key}][qty]

Then you can either use PHP to loop through $this->data("product") to build your email text, or a Loop action (NOT loop event action) set to return as var, data source {data:product} and on each loop you can do (again, example)
Product: {var:loop#.row.name} <br>
Quantity: {var:loop#.row.qty} <br><br>

Then in your email body do
PRODUCT ORDERS
{var:loop#}

Replace the # with the right number of your loop action.
da davboc 04 Apr, 2019
Thanks again for your explanation, and sorry for my mistakes.

Loop form must be triggered by the submit action?

I attach my settings, what's wrong?

Send content of


Send content of
he healyhatman 04 Apr, 2019
Answer
1 Likes
You put it in the LABEL instead of the field NAME
da davboc 04 Apr, 2019
I'm very sorry. Now it works! Thanks again
This topic is locked and no more replies can be posted.