Index: modules/contact.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact.module,v
retrieving revision 1.18
diff -u -r1.18 contact.module
--- modules/contact.module	27 Jun 2005 18:33:32 -0000	1.18
+++ modules/contact.module	30 Jul 2005 02:22:36 -0000
@@ -178,12 +178,17 @@
       drupal_goto('admin/contact');
     }
   }
+  if (!isset($edit))
+  {
+    $subject            = db_fetch_object(db_query("SELECT * FROM {contact} WHERE subject = '%s'", $subject));
+    $edit['subject']    = $subject->subject;
+    $edit['recipients'] = $subject->recipients;
+    $edit['reply']      = $subject->reply;
+  }
 
-  $subject = db_fetch_object(db_query("SELECT * FROM {contact} WHERE subject = '%s'", $subject));
-
-  $form = form_textfield(t('Subject'), 'subject', $subject->subject, 60, 255, t("Example: 'website feedback' or 'product information'."), NULL, TRUE);
-  $form .= form_textarea(t('Recipients'), 'recipients', $subject->recipients, 60, 5, t("Example: 'webmaster@yoursite.com' or 'sales@yoursite.com'.  To specify multiple repecients, separate each e-mail address with a comma."), NULL, TRUE);
-  $form .= form_textarea(t('Auto-reply'), 'reply', $subject->reply, 60, 5, t("Optional auto-reply.  Leave empty if you don't want to send the user an auto-reply message."));
+  $form  = form_textfield(t('Subject'), 'subject', $edit['subject'], 60, 255, t("Example: 'website feedback' or 'product information'."), NULL, TRUE);
+  $form .= form_textarea(t('Recipients'), 'recipients', $edit['recipients'], 60, 5, t("Example: 'webmaster@yoursite.com' or 'sales@yoursite.com'.  To specify multiple repecients, separate each e-mail address with a comma."), NULL, TRUE);
+  $form .= form_textarea(t('Auto-reply'), 'reply', $edit['reply'], 60, 5, t("Optional auto-reply.  Leave empty if you don't want to send the user an auto-reply message."));
   $form .= form_submit(t('Submit'));
 
   return form($form);
