Index: sites/all/modules/multistep/multistep.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/multistep/multistep.module,v
retrieving revision 1.1.2.2.2.23
diff -u -r1.1.2.2.2.23 multistep.module
--- sites/all/modules/multistep/multistep.module	8 Sep 2009 13:30:40 -0000	1.1.2.2.2.23
+++ sites/all/modules/multistep/multistep.module	13 Oct 2009 20:27:15 -0000
@@ -159,8 +159,12 @@
       }
       $group = _fieldgroup_field_get_group($type, $field['field_name']);
       $groups = fieldgroup_groups($type);
-      // Set #access to FALSE if it does not belong in the current step.
-      if ($groups[$group]['settings']['multistep']['step'] != $step) {
+      // Set #access to FALSE if the current field does not belong in the current step.
+      if ($field['widget']['multistep'] != $step && !$groups[$group]) {
+        return FALSE;
+      }
+      // Set #access to FALSE if the current field's group does not belong in the current step.
+      if ($groups[$group]['settings']['multistep']['step'] != $step && $groups[$group]) {
         return FALSE;
       }
   }
@@ -324,6 +328,40 @@
 }
 
 /**
+ * Implementation of hook_widget_settings_alter().
+ * This is the part where you can set the step of individual fields.
+ */
+function multistep_widget_settings_alter(&$form, $op, $widget) {
+  $type = arg(3);
+  $field = arg(5);
+  // Do nothing if multistep is not enabled for this node type or if this field already belongs to a group.
+  if (variable_get('multistep_expose_' . $type, 'disabled') != 'enabled' || fieldgroup_get_group($type, $field)) {
+    return;
+  }
+  switch ($op) {
+    case 'form':
+      $form['multistep'] = array(
+        '#type' => 'fieldset',
+        '#title' => t('Multistep'),
+        '#collapsible' => TRUE,
+        '#collapsed' => isset($widget['multistep']) ? FALSE : TRUE,
+        '#weight' => 5,
+      );
+      $form['multistep']['multistep'] = array(
+        '#type' => 'select',
+        '#title' => t('Field step'),
+        '#default_value' => isset($widget['multistep']) ? $widget['multistep'] : 0,
+        '#options' => _multistep_get_steps($type),
+        '#description' => t('Select the step this field belongs to.'),
+      );
+      break;
+    case 'save':
+      $form = array_merge($form, array('multistep'));
+      break;
+  }
+}
+
+/**
  * Implementation of hook_form_alter().
  * This is the node-editing form.
  */
