Forums

Send content of "repeater area" via e-mail

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
healyhatman 03 Apr, 2019
What have you named the fields in your repeater area?
healyhatman 03 Apr, 2019
1 Likes
What have you named the fields in your repeater area?
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
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.
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?




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