Index: prepopulate.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/prepopulate/prepopulate.module,v
retrieving revision 1.5.2.1
diff -u -p -r1.5.2.1 prepopulate.module
--- prepopulate.module	12 Mar 2008 16:40:38 -0000	1.5.2.1
+++ prepopulate.module	28 Apr 2008 06:03:09 -0000
@@ -14,7 +14,7 @@
  * Implementation of hook_help().
  */
 function prepopulate_help($section) {
-  switch($section) {
+  switch ($section) {
     case 'admin/modules#description':
       return t('Pre-populates forms for allowed content types with HTTP GET data');
       break;
@@ -34,9 +34,16 @@ function prepopulate_form_alter($form_id
       $form['workflow']['prepopulate_allowed'] = array(
         '#type' => 'checkbox',
         '#title' => 'Prepopulate form from URL?',
-        '#default_value' => variable_get('prepopulate_allowed_' . $type, TRUE),
+        '#default_value' => variable_get('prepopulate_allowed_'. $type, TRUE),
         '#description' => t('Allows fields to be prepopulated from the URL'),
       );
+      $form['workflow']['prepopulate_hide'] = array(
+        '#type' => 'checkbox',
+        '#title' => 'Hide on prepopulate?',
+        '#default_value' => variable_get('prepopulate_hide_'. $type, TRUE),
+        '#description' => t('Hide the field on the form if it is prepopulated on
+                            from the URL'),
+      );
     return;
   } // endswitch $form_id
 
@@ -58,7 +65,12 @@ function prepopulate_form_alter($form_id
 function _prepopulate_get_walk(&$form, &$getslice) {
   if (!is_array($getslice)) {
     $form['#default_value'] = $getslice;
-  } 
+    $type = check_plain(arg(2));
+    if (variable_get('prepopulate_hide_'. $type, FALSE)) {
+      $form['#type'] = 'hidden';
+      $form['#theme'] = 'hidden';
+    }
+  }
   else {
     foreach (array_keys($getslice) as $getvar) {
       if (element_child($getvar) && is_array($form) && !is_null($form[$getvar])) {
