JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
tem_run() (and tem::run()) doesn't overwrite the template stored in the class with...
[wfpl.git] / metaform / template.php
index 5aa4395..537c22f 100644 (file)
@@ -116,8 +116,7 @@ function ~form_name~() {<!--~opt_http_pass_2 start~-->
                                $cc = '';
                                $bcc = '';
                                if(email($from, $to, $subject, $message, $cc, $bcc)) {
-                                       tem_set('error_message', 'Due to an internal error, your message could not be sent. Please try again later.');
-                                       tem_sub('error');
+                                       message('Due to an internal error, your message could not be sent. Please try again later.');
                                        $error = true;
                                }
                        }<!--~end~-->
@@ -143,6 +142,7 @@ function ~form_name~() {<!--~opt_http_pass_2 start~-->
 
        tem_set('upload_max_filesize', upload_max_filesize());<!--~end~-->
 
+       display_messages();
        tem_sub('form');
 }