diff --git a/sites/all/modules/revision_scheduler/revision_scheduler.module b/sites/all/modules/revision_scheduler/revision_scheduler.module
index b6bc970..b4e79fd 100644
--- a/sites/all/modules/revision_scheduler/revision_scheduler.module
+++ b/sites/all/modules/revision_scheduler/revision_scheduler.module
@@ -497,7 +497,100 @@ function revision_scheduler_entity_load_by_revision($entity_type, $entity_id, $r
  * Implements hook_field_attach_form().
  */
 function revision_scheduler_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) {
-  //$operations = revision_scheduler_entity_revision_operation_get_options($entity_type, $entity);
+  $operations = array_merge(array('' => t('None')), revision_scheduler_entity_revision_operation_get_options($entity_type, $entity));
+  $container = &$form;
+  // Try to put the field in the Publish options fieldset, for the case when
+  // the entity_type is 'node'.
+  if (isset($form['options']) && $form['options']['#type'] == 'fieldset') {
+    $container = &$form['options'];
+  }
+  $container['revision_scheduler_operation'] = array(
+    '#type' => 'select',
+    '#options' => $operations,
+    '#title' => t('Operation'),
+    '#description' => t('Please select an operation that should be scheduled.')
+  );
+  $container['revision_scheduler_datetime'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Scheduled date'),
+    '#default_value' => format_date(REQUEST_TIME+3600, 'custom', 'm/d/Y - H:i'),
+  );
+
+  if (module_exists('date_popup')) {
+    $container['revision_scheduler_datetime']['#type'] = 'date_popup';
+    $container['revision_scheduler_datetime']['#date_format'] = 'm/d/Y - H:i';
+    $container['revision_scheduler_datetime']['#date_year_range'] = '0:+5';
+    $container['revision_scheduler_datetime']['#date_increment'] = 15;
+  }
+  // Add some validation and submit handlers.
+  if (isset($form['actions']) && $form['actions']['submit']['#type'] == 'submit') {
+    $form['actions']['submit']['#validate'][] = 'revision_scheduler_field_form_validate';
+    $form['actions']['submit']['#submit'][] = 'revision_scheduler_field_form_submit';
+  }
+  else {
+    $form['#validate'][] = 'revision_scheduler_field_form_validate';
+    $form['#submit'][] = 'revision_scheduler_field_form_submit';
+  }
+}
+
+/**
+ * Additional validation handler for the scheduler field.
+ */
+function revision_scheduler_field_form_validate($form, &$form_state) {
+  // If the operation is not empty, check also to see if the date is not empty
+  // and valid.
+  if (!empty ($form_state['values']['revision_scheduler_operation'])) {
+    if (empty($form_state['values']['revision_scheduler_datetime'])) {
+      form_set_error('revision_scheduler_datetime', t('If you select an operation to be scheduled, you must also select a date and a time.'));
+    }
+    elseif (is_string($form_state['values']['revision_scheduler_datetime'])) {
+      $date = strtotime($form_state['values']['revision_scheduler_datetime']);
+      if ($date === FALSE) {
+        form_set_error('revision_scheduler_datetime', t('Invalid date.'));
+      }
+    }
+  }
+}
+
+/**
+ * Additional submit handler for the scheduler field.
+ * 
+ * It will actually create a new scheduled operation.
+ */
+function revision_scheduler_field_form_submit($form, &$form_state) {
+  // Proceed only if there is a scheduled operation selected.
+  if (!empty ($form_state['values']['revision_scheduler_operation'])) {
+    // If we have a valid entity type, reload the entity so that we have the
+    // newest revision id.
+    if (isset ($form['#entity_type'])) {
+      $entity_info = entity_get_info($form['#entity_type']);
+      $entity_id = NULL;
+      if ($entity_info && isset($entity_info['entity keys']['id'])) {
+        $entity_id = $form_state['values'][$entity_info['entity keys']['id']];
+        if ($entity_id) {
+          // If we are here, we have a valid entity type and a valid entity id,
+          // so load it first.
+          $entity = revision_scheduler_entity_load_by_revision($form['#entity_type'], $entity_id);
+          // Construct the scheduler object and save it.
+          $operation = new stdClass();
+          $operation->id = NULL;
+          $operation->entity_type = $form['#entity_type'];
+          $operation->entity_id = $entity_id;
+          $operation->revision_id = $entity->{$entity_info['entity keys']['revision']};
+          $operation->operation = $form_state['values']['revision_scheduler_operation'];
+          if (is_string($form_state['values']['revision_scheduler_datetime'])){
+            $operation->time_scheduled = strtotime($form_state['values']['revision_scheduler_datetime']);
+          } else {
+            $operation->time_scheduled = strtotime($form_state['values']['revision_scheduler_datetime']['date'] . ' ' . $form_state['values']['revision_scheduler_datetime']['time']);
+          }
+          $operation->time_queued = 0;
+          $operation->time_executed = 0;
+          revision_scheduler_operation_save($operation);
+          drupal_set_message('The scheduled revision operation has been saved.');
+        }
+      }
+    }
+  }
 }
 
 /**
