From: Patrick Canterino Date: Sat, 3 Dec 2011 13:12:40 +0000 (+0000) Subject: Fehlermeldungen bei indiv. Formularfeldern enthalten X-Git-Tag: 3.5~55 X-Git-Url: https://git.p6c8.net/form-email.git/commitdiff_plain/a2e35aed2b2920454ece2fd3aef9404a923dc238?ds=sidebyside Fehlermeldungen bei indiv. Formularfeldern enthalten nun ausgefuellte Formularfelder --- diff --git a/form-email/config.php b/form-email/config.php index 7ab893c..42b60b4 100644 --- a/form-email/config.php +++ b/form-email/config.php @@ -130,7 +130,7 @@ $err_captcha_session_failure = 'Keine g $tpl_mail = 'mail_individual.txt'; $tpl_sent = 'sent.htm'; -$tpl_user_error = 'user_error.htm'; +$tpl_user_error = 'user_error_individual.htm'; $tpl_fatal = 'fatal.htm'; # diff --git a/form-email/functions.php b/form-email/functions.php index e353da8..eb7f920 100644 --- a/form-email/functions.php +++ b/form-email/functions.php @@ -123,7 +123,7 @@ function show_fatal(&$errmsg) { # Parameter: Fehlermeldung function show_user_error(&$errmsg) { - global $captcha_enable, $email, $name, $subject, $text, $tpl_user_error; + global $captcha_enable, $email, $name, $subject, $text, $user_fields, $tpl_user_error; $tpl = new Template; $tpl->read_file($tpl_user_error); @@ -136,6 +136,12 @@ function show_user_error(&$errmsg) { $tpl->set_var('SUBJECT',htmlentities($subject)); $tpl->set_var('TEXT', htmlentities($text)); + reset($user_fields); + + while(list($user_field,$user_field_data) = each($user_fields)) { + $tpl->set_var($user_field_data['tpl_var'],htmlentities(formdata($user_field))); + } + $tpl->parse(); print $tpl->get_template();