Index: webform.module
===================================================================
--- webform.module	2008-02-29 11:16:40.133153048 -0500
+++ webform.module	2008-02-29 14:21:20.877268769 -0500
@@ -144,11 +144,19 @@ function webform_menu($may_cache) {
         'type' => MENU_LOCAL_TASK,
       );
       $items[] = array(
+        'path' => 'node/'. $node->nid .'/results/anonymizer',
+        'title' => t('Anonymous'),
+        'callback' => 'webform_results',
+        'access' => user_access('access webform results'),
+        'weight' => 8,
+        'type' => MENU_LOCAL_TASK,
+      );
+      $items[] = array(
         'path' => 'node/'. $node->nid .'/results/clear',
         'title' => t('Clear'),
         'callback' => 'webform_results',
         'access' => user_access('clear webform results'),
-        'weight' => 8,
+        'weight' => 9,
         'type' => MENU_LOCAL_TASK,
       );
       $items[] = array(
@@ -226,7 +234,7 @@ function webform_insert($node) {
   }
 
   // Insert the Webform.
-  db_query("INSERT INTO {webform} (nid, confirmation, redirect_post, submit_limit, submit_interval, email, email_from_name, email_from_address, email_subject, additional_validate, additional_submit) VALUES (%d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s')", $node->nid, $node->confirmation, $node->redirect_post, $node->submit_limit, $node->submit_interval, $node->email, $node->email_from_name, $node->email_from_address, $node->email_subject, $node->additional_validate, $node->additional_submit);
+  db_query("INSERT INTO {webform} (nid, confirmation, redirect_post, submit_limit, submit_interval, email, email_from_name, email_from_address, email_subject, additional_validate, additional_submit, anonymize_form) VALUES (%d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', %d)", $node->nid, $node->confirmation, $node->redirect_post, $node->submit_limit, $node->submit_interval, $node->email, $node->email_from_name, $node->email_from_address, $node->email_subject, $node->additional_validate, $node->additional_submit, $node->anonymize_form);
 
   // Insert the components into the database.
   if (is_array($node->webformcomponents) && !empty($node->webformcomponents)) {
@@ -831,6 +839,12 @@ function webform_form(&$node, &$param) {
     '#description' => t("Forward the contents of the POST array to the redirect URL. Use this option for custom processing of the form information. No processing will be done by webform. The confirmation option above MUST be a full redirect URL for this option to have an effect."),
     '#default_value' => $node->redirect_post,
   );
+  $form['advanced']['anonymize_form'] = array(
+    '#type' => 'checkbox',
+    '#title' => t("Anonymize Form"),
+    '#description' => t("Anonymizes form so that submissions are not linked with users, but their submission count can still be checked."),
+    '#default_value' => $node->anonymize_form,
+  );
   /* End Advanced Settings Form */
 
   // Add hidden form elements containing the contents of the components.
@@ -1762,8 +1776,14 @@ function _webform_save_submission($node,
   global $user;
 
   $sid = db_next_id('{webform_submissions}_sid');
-
-  db_query("INSERT INTO {webform_submissions} (nid, sid, uid, submitted, remote_addr) "." VALUES (%d, %d, %d, %d, '%s')", $node->nid, $sid, $user->uid, time(), $_SERVER['REMOTE_ADDR']);
+  
+  if ($node->anonymize_form == 1) {
+    db_query("INSERT INTO {webform_anonymizer} (nid, uid, submitted) "."VALUES (%d, %d, %d)", $node->nid, $user->uid, time());
+    db_query("INSERT INTO {webform_submissions} (nid, sid, uid, submitted, remote_addr) "." VALUES (%d, %d, 0, %d, '')", $node->nid, $sid, time());
+  }
+  else {
+    db_query("INSERT INTO {webform_submissions} (nid, sid, uid, submitted, remote_addr) "." VALUES (%d, %d, %d, %d, '%s')", $node->nid, $sid, $user->uid, time(), $_SERVER['REMOTE_ADDR']);
+  }
 
   foreach ($submitted as $cid => $value) {
     if (is_array($value)) {
@@ -1820,6 +1840,9 @@ function webform_results() {
       case 'download' :
         $content = _webform_results_download($nid);
         break;
+      case 'anonymizer' :
+        $content = _webform_results_anonymizer($nid);
+        break;
       case 'edit':
         $sid = arg(4);
         $content = webform_submission_edit($node, $sid);
