How add repeater area field to custom email body?

Add a repeater area field to a custom ChronoForms email body.

Overview

The issue is that repeater area data is not directly accessible in the email body template.
Use a Custom PHP action before the Email action to loop through the repeater data, build the HTML output, and save it as a new form data variable. Then, reference this new variable in your email body template.

Answered
ChronoForms v6
We Webpiksel 27 Apr, 2018
Hello, I have form like the picture below:

How add repeater area field to custom email body? image 1

I want create custom email body, but I don't know, how add repeater area to it. Please help me🙂

How add repeater area field to custom email body? image 2
Gr GreyHead 28 Apr, 2018
Hi Webpiksel,

I would use a Custom PHP action before the Email action to loop through the Repeater data, build the HTML to display it and save that to the form data as a new item. Then you can display that whole item in the Email Body.

Bob
We Webpiksel 28 Apr, 2018
I wrote simple php code like this:
for ( $i=0; $i<10; $i++ ) {
$nazwa = "rodzaj{$i}";
$nazwa2 = "ilosc{$i}";
if (!empty($_POST[$nazwa]) ) {
$wynik .= 'Rodzaj auta: <strong>'.$_POST[$nazwa].'</strong><br/>';
$wynik .= 'Ilość: <strong>'.$_POST[$nazwa2].'</strong><br/>';
};
};
How put $wynik to email body?
Gr GreyHead 28 Apr, 2018
Answer
1 Likes
Hi Webpiksel,

Please see Page 34 in the CFV6 manual.

Bob
We Webpiksel 28 Apr, 2018
It's works!

How add repeater area field to custom email body? image 3

How add repeater area field to custom email body? image 4

Thank you for your help!!
This topic is locked and no more replies can be posted.