From a2e35aed2b2920454ece2fd3aef9404a923dc238 Mon Sep 17 00:00:00 2001 From: Patrick Canterino Date: Sat, 3 Dec 2011 13:12:40 +0000 Subject: [PATCH 1/1] Fehlermeldungen bei indiv. Formularfeldern enthalten nun ausgefuellte Formularfelder --- form-email/config.php | 2 +- form-email/functions.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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(); -- 2.34.1