Hi ...
I'am affraid it will take a lot modification in machform file (entry-functions.php, helper-functions.php, and post-functions.php) :).
1. entry-functions.php
make sure you have done what yuniar said, to edit around line 206
2. helper-functions.php
- Edit line 275 ~ 285 to :
if($data['element_type'] == 'textarea'){
$template_values[$i] = nl2br($data['value']);
}elseif ($data['element_type'] == 'file'){
if($target_is_admin === false){
$template_values[$i] = strip_tags($data['value']);
}else{
$template_values[$i] = strip_tags($data['value'],'<a>');
}
}elseif ($data['element_type'] == 'section') {
$template_values[$i] = $data['label'];
}else{
$template_values[$i] = $data['value'];
}
- Insert this code to line 329 and 365, exactly below "foreach ($entry_details as $data){" code
if ($data['element_type'] == 'section') {
$data['value'] = $data['label'];
}
- Edit line 353 ~ 356
From :
$email_body .= "<tr {$row_style}>\n";
$email_body .= '<td width="40%" style="border-bottom:1px solid #DEDEDE;padding:5px
10px;"><strong>'.$data['label'].'</strong> </td>'."\n";
$email_body .= '<td width="60%" style="border-bottom:1px solid #DEDEDE;padding:5px
10px;">'.$data['value'].'</td>'."\n";
$email_body .= '</tr>'."\n";
to
if ($data['element_type'] <> 'section') {
$email_body .= "<tr {$row_style}>\n";
$email_body .= '<td width="40%" style="border-bottom:1px solid
#DEDEDE;padding:5px 10px;"><strong>'.$data['label'].'</strong> </td>'."\n";
$email_body .= '<td width="60%" style="border-bottom:1px solid
#DEDEDE;padding:5px 10px;">'.$data['value'].'</td>'."\n";
$email_body .= '</tr>'."\n";
} else {
$email_body .= "<tr {$row_style}>\n";
$email_body .= '<td width="40%" colspan="2" style="border-bottom:1px solid
#DEDEDE;padding:5px 10px;"><strong>'.$data['label'].'</strong> </td>'."\n";
$email_body .= '</tr>'."\n";
}
3. Multiple email
and for multiple email sender, you can edit includes/post-functions.php. let say your form is having id = 12 and your email fields are having id 'element_2' and 'element_3'.
Edit your includes/post-functions.php file between line 1117 ~ 1119, replace those lines with these:
//to email
if(is_numeric($esr_email_address)){
if ($form_id == 12) { // <-- form id
$esr_email_address1 = '{element_'.'2'.'}';
$esr_email_address2 = '{element_'.'3'.'}';
$esr_email_address = $esr_email_address1.','.$esr_email_address2 ;
} else {
$esr_email_address = '{element_'.$esr_email_address.'}';
}
}
That should send email to 2 email form fields. :) i hope you not missing anything