Hello,
I added the feature like explaned in this turtorial on Chronoengine (http://www.chronoengine.com/faqs/70-cfv5/5226-how-can-i-have-a-button-to-add-more-form-inputs-2.html) and that all is working except for the last part: I don't know how to get the data which is filled in in the form in to the email.
The turtorial says: The resulting data is returned as a sub array in $form->data['recipient'] and may need further processing before it can be saved or used in an email.
But I do't know what tot do the get it working.
Thanks a lot in advance, Kees
I added the feature like explaned in this turtorial on Chronoengine (http://www.chronoengine.com/faqs/70-cfv5/5226-how-can-i-have-a-button-to-add-more-form-inputs-2.html) and that all is working except for the last part: I don't know how to get the data which is filled in in the form in to the email.
The turtorial says: The resulting data is returned as a sub array in $form->data['recipient'] and may need further processing before it can be saved or used in an email.
But I do't know what tot do the get it working.
Thanks a lot in advance, Kees
Hi Kees.
Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here so that we can see what data you are starting with.
Bob
Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here so that we can see what data you are starting with.
Bob
Hi Bob,
Thank you.
I used some fields in the table of the mail as you see below, but that didn't work of course. This is still in there.
Thank you.
I used some fields in the table of the mail as you see below, but that didn't work of course. This is still in there.
<tr>
<td>Gezinslid toevoegen</td>
<td>{recipient[][name]}</td>
</tr>
<tr>
<td> </td>
<td>{recipient[][address]}</td>
</tr>
<tr>
<td> </td>
<td>{recipient[][burger]}</td>
</tr>
This is private content
Hi Kees,
It looks as though you have a Handle Arrays action in the form - that is giving the Array,Array,. . . result. Please remove that for the moment and re-paste the Debugger output for [recipients]
Bob
It looks as though you have a Handle Arrays action in the form - that is giving the Array,Array,. . . result. Please remove that for the moment and re-paste the Debugger output for [recipients]
Bob
Hi keske,
I would add a Custom Code action like this
You can edit the HTML in the output line to suit your needs.
Bob
I would add a Custom Code action like this
<?php
$output = array();
foreach ( $form->data['recipient'] as $r ) {
if ( !empty($r['name']) ) {
$output[] = "<p>Name: {$r['name']} Address: {$r['address']} Burger: {$r['burger']}</p>";
}
}
$form->data['recipient_info'] = implode("\n", $output);
?>
then add {recipient_info} to the email template.
You can edit the HTML in the output line to suit your needs.
Bob
This topic is locked and no more replies can be posted.