[Done v1.5.2] function email_collect_extra_info, closing table tag in wrong place
I see 1.5.2 now supports the use of additional fields in the extra info section (something I use), despite not yet being used by any other vanilla code, as far as I can see.
PHP Code:
'<tr><td class="extra-info-bold">' . OFFICE_DATE_TIME . '</td><td>' . date('D M j Y G:i:s T') . '</td></tr>' . '</table>';
foreach($moreinfo as $key => $val) {
$extra_info['TEXT'] .= $key . ': ' . $val . "\n";
$extra_info['HTML'] .= '<tr><td class="extra-info-bold">' . $key . '</td><td>' . $val . '</td></tr>';
}
return $extra_info; }
However the closing table tag should now be moved to encompass the optional fields.
I suggest:
PHP Code:
'<tr><td class="extra-info-bold">' . OFFICE_DATE_TIME . '</td><td>' . date('D M j Y G:i:s T') . '</td></tr>' ;
foreach($moreinfo as $key => $val) {
$extra_info['TEXT'] .= $key . ': ' . $val . "\n";
$extra_info['HTML'] .= '<tr><td class="extra-info-bold">' . $key . '</td><td>' . $val . '</td></tr>';
}
$extra_info['TEXT'] .= "\n";
$extra_info['HTML'] .= '</table>';
return $extra_info;
}
For the interest of anyone wishing to use this new functionality, the format of the array to be passed in the email_collect_extra_info function call would be something like this:
PHP Code:
$extra_fields = array(
EMAIL_FORM_HONEYPOT => $honeypot_field,
EMAIL_FORM_FILL_TIME => $form_fill_time
);
Re: function email_collect_extra_info, closing table tag in wrong place