diff --git rules/rules.module rules/rules.module
index 16cd4d5..2f2f5dd 100644
--- rules/rules.module
+++ rules/rules.module
@@ -825,6 +825,10 @@ function rules_theme() {
       'render element' => 'element',
       'file' => 'ui/ui.theme.inc',
     ),
+    'rules_autocomplete' => array(
+      'render element' => 'element',
+      'file' => 'ui/ui.theme.inc',
+    ),
   );
 }
 
@@ -1013,6 +1017,12 @@ function rules_element_info() {
     '#after_build' => array('rules_ui_element_duration_after_build'),
     '#pre_render' => array('form_pre_render_conditional_form_element'),
   );
+  $types['rules_data_selection'] = array(
+    '#input' => TRUE,
+    '#pre_render' => array('form_pre_render_conditional_form_element'),
+    '#process' => array('rules_data_selection_autocomplete_path'),
+    '#theme' => 'rules_autocomplete',
+  );
   return $types;
 }
 
diff --git rules/ui/rules.autocomplete.js rules/ui/rules.autocomplete.js
new file mode 100644
index 0000000..e4c9a9e
--- /dev/null
+++ rules/ui/rules.autocomplete.js
@@ -0,0 +1,124 @@
+// $Id$
+
+Drupal.rules = Drupal.rules || {};
+
+(function ($) {
+  // Create an Rules namespaces if it does not exist.
+
+  Drupal.behaviors.rules_autocomplete = {
+    attach: function(context) {
+      $("button").button();
+      $("button").click(function() { return false; });
+
+      var autocomplete_settings = Drupal.settings.rules_autocomplete;
+      
+      $('input.rules-autocomplete').once(function() {
+        var input = this;
+        new Drupal.rules.autocomplete(input, autocomplete_settings[$(input).attr('id')]);
+      });
+    }
+  };
+
+  /**
+   * Rules autocomplete object.
+   */
+  Drupal.rules.autocomplete = function(input, settings) {
+    this.id = settings.inputId;
+    this.uri = location.protocol + '//' + location.host + Drupal.settings.basePath + settings.source;
+    this.jqObject = $('#' + this.id);
+    this.cache = new Array();
+    this.jqObject.addClass('ui-corner-left');
+
+    this.button = $('<span>&nbsp;</span>');
+    this.button.attr({
+      'tabIndex': -1,
+      'title': 'Show all items'
+    });
+    this.button.insertAfter(this.jqObject);
+    
+    this.button.button({
+      icons: {
+        primary: 'ui-icon-triangle-1-s'
+      },
+      text: false
+    });
+
+    this.button.removeClass('ui-corner-all');
+    this.button.addClass('ui-corner-right ui-button-icon rules-autocomplete-button');
+
+    // Save the current rules_autocomplete object, so it can be used handlers.
+    var instance = this;
+
+    this.jqObject.autocomplete();
+    this.jqObject.autocomplete("option", "minLength", 0);
+    // Add a custom class, so we can style the autocomplete box without
+    // interfering with other jquery autocomplete widgets. 
+    instance.jqObject.autocomplete("widget").addClass('rule-autocomplete');
+
+    // Event handlers
+    this.jqObject.focusin(function() {
+      instance.open();
+    });
+    this.jqObject.focusout(function() {
+      instance.close();
+    });
+    this.jqObject.bind( "autocompleteselect", function(event, ui) {
+      instance.close();
+    });
+
+    this.jqObject.autocomplete("option", "source", function(request, response){
+      if (request.term in instance.cache) {
+        response(instance.cache[request.term]);
+        return;
+      }
+      $.ajax({
+        url: instance.uri + '/' + request.term,
+        dataType: "json",
+        success: function(data){
+        instance.success(data, request, response);
+        }
+      });
+    });
+
+    this.button.click(function() {
+      if (instance.jqObject.autocomplete("widget").is( ":visible")) {
+        instance.close();
+      }
+      else {
+        instance.open();
+      }
+    }); 
+  };
+
+  /**
+   * Success function for Rules autocomplete object.
+   */
+  Drupal.rules.autocomplete.prototype.success = function(data, request, response) {
+    var list = new Array();
+    jQuery.each(data, function(index, value) {
+      list.push({
+        label: value,
+        value: index
+      });
+    });
+    this.cache[request.term] = list;
+    response(list);
+  };
+
+  /**
+   * Open the autocomplete window.
+   */
+  Drupal.rules.autocomplete.prototype.open = function () {
+    this.jqObject.autocomplete("search", this.jqObject.val());
+    this.button.addClass("ui-state-focus");
+  };
+
+  /**
+   * Close the autocomplete window.
+   */
+  Drupal.rules.autocomplete.prototype.close = function () {
+    this.jqObject.autocomplete("close");
+    this.button.removeClass("ui-state-focus");
+  };
+
+})(jQuery);
diff --git rules/ui/rules.ui.css rules/ui/rules.ui.css
index ec467e0..f516fda 100755
--- rules/ui/rules.ui.css
+++ rules/ui/rules.ui.css
@@ -9,8 +9,8 @@
 }
 
 .rules-elements-table ul.action-links .delete a, .rules-elements-table ul.action-links .edit a {
-	background: none;
-	padding-left: 0px;
+  background: none;
+  padding-left: 0px;
 }
 
 .rules-elements-table ul.action-links a {
@@ -18,8 +18,8 @@
 }
 
 .rules-elements-table ul.action-links {
-	margin: 0px;
-	padding-left: 2px;
+  margin: 0px;
+  padding-left: 2px;
 }
 
 table tr.rules-elements-add {
@@ -32,7 +32,7 @@ tr.rules-elements-add td {
 }
 
 .rules-elements-table {
-	margin-bottom: 3em;
+  margin-bottom: 3em;
 }
 /* We cannot set a positive margin-top for rules tables as the table drag link
    should be positioned directly on top of the table. Thus we use a large bottom
@@ -43,27 +43,27 @@ tr.rules-elements-add td {
 
 /* Fix table drag weights to don't take extra space */
 .rules-elements-table .tabledrag-toggle-weight-wrapper {
-	position: absolute;
-	right: 0px;
+  position: absolute;
+  right: 0px;
 }
 
 .rules-elements-table caption, .rules-overview-table caption {
-	font-size: 110%;
-	font-weight: bold;
-	padding-bottom: 0.5em;
-	text-align: left;
+  font-size: 110%;
+  font-weight: bold;
+  padding-bottom: 0.5em;
+  text-align: left;
 }
 
 .rules-overview-table {
-	margin: 1em 0;
+  margin: 1em 0;
 }
 
 .rules-debug-log {
-	background-color: #EEEEEE;
-	border: 1px solid #CCCCCC;
-	font-color: #333333;
-	padding: 5px;
-	margin: 2em;
+  background-color: #eeeeee;
+  border: 1px solid #cccccc;
+  font-color: #333333;
+  padding: 5px;
+  margin: 2em;
 }
 
 .rules-debug-log ul {
@@ -86,27 +86,43 @@ tr.rules-elements-add td {
   float: left;
 }
 
-#autocomplete .rules-dsac-group {
-	font-style: italic;
-	background-color: #CCCCCC;
-	color: #222222;
+.rules-dsac-group {
+  font-style: italic;
+  background-color: #cccccc;
+  color: #222222;
 }
 
-#autocomplete li.selected .rules-dsac-group {
+li.selected .rules-dsac-group {
   background: #0072b9;
   color: #fff;
 }
 
 form input.rules-switch-button {
-	-moz-border-radius: 5px 5px 5px 5px;
-	cursor: pointer;
-	font-size: 0.8em;
-	font-weight: normal;
-	margin-bottom: 1em;
-	padding: 2px;
-	text-align: center;
+  -moz-border-radius: 5px 5px 5px 5px;
+  cursor: pointer;
+  font-size: 0.8em;
+  font-weight: normal;
+  margin-bottom: 1em;
+  padding: 2px;
+  text-align: center;
 }
 
 .rules-form-heading {
-	margin-top: 3em;
+  margin-top: 3em;
+}
+
+.rules-autocomplete-button {
+  top: 3px;
+  height: 22px;
+}
+
+ul.rule-autocomplete {
+  max-height: 23em;
+  overflow-y: auto; 
+}
+
+/* IE 6 hack for max-height. */
+* html ul.rule-autocomplete{
+  height: 23em;
 }
+
diff --git rules/ui/ui.data.inc rules/ui/ui.data.inc
index 9f03250..ee748bb 100755
--- rules/ui/ui.data.inc
+++ rules/ui/ui.data.inc
@@ -58,12 +58,14 @@ class RulesDataUI {
       }
     }
     $form[$name . ':select'] = array(
-      '#type' => 'textfield',
+      '#type' => 'rules_data_selection',
       '#title' => t('Data selector'),
       '#default_value' => $settings[$name . ':select'],
       '#required' => empty($info['optional']),
-      '#autocomplete_path' => RulesPluginUI::path($element->root()->name, 'autocomplete'. '/' . $name),
-      '#process' => array('rules_data_selection_autocomplete_path'),
+      '#autocomplete_path' => RulesPluginUI::path($element->root()->name, 'autocomplete' . '/' . $name),
+      // Make the autocomplete textfield big enough so that it can display
+      // descriptions without word wraps.
+      '#size' => 75,
     );
     $form['help'] = array(
       '#theme' => 'rules_data_selector_help',
diff --git rules/ui/ui.forms.inc rules/ui/ui.forms.inc
index a636742..f4763fd 100755
--- rules/ui/ui.forms.inc
+++ rules/ui/ui.forms.inc
@@ -568,6 +568,27 @@ function rules_ui_element_duration_after_build($element, &$form_state) {
 }
 
 /**
+ * Prerender function for rules_autocomplete
+ */
+function rules_ui_autocomplete_prerender($element, &$form_state) {
+  if (isset($element['#title']) && $element['#title_display'] == 'attribute') {
+    $element['#attributes']['title'] = $element['#title'];
+    if (!empty($element['#required'])) {
+      // Append an indication that this field is required.
+      $element['#attributes']['title'] .= ' (' . $t('Required') . ')';
+    }
+  }
+
+  $element['value'] = array(
+    '#type' => 'textfield',
+    '#element_validate' => array('rules_ui_element_integer_validate'),
+    '#default_value' => $element['#default_value'],
+    '#required' => !empty($element['#required']),
+  );
+  return $element;
+}
+
+/**
  * FAPI after build callback for specifying a list of values. Turns the textual
  * value in an array.
  */
diff --git rules/ui/ui.theme.inc rules/ui/ui.theme.inc
index a9ba8d3..77b7913 100755
--- rules/ui/ui.theme.inc
+++ rules/ui/ui.theme.inc
@@ -207,3 +207,34 @@ function theme_rules_log($variables) {
   $output .= '</div>';
   return $output;
 }
+
+/**
+ * Themes rules autocomplete forms.
+ * @ingroup themeable
+ */
+function theme_rules_autocomplete($variables) {
+  $element = $variables['element'];
+  drupal_add_js(drupal_get_path('module', 'rules') . '/ui/rules.autocomplete.js');
+  drupal_add_library('system', 'ui.autocomplete');
+  drupal_add_library('system', 'ui.button');
+
+  $element['#attributes']['type'] = 'text';
+  element_set_attributes($element, array('id', 'name', 'value', 'size', 'maxlength'));
+  _form_set_class($element, array('form-text', 'rules-autocomplete'));
+
+  $id = $element['#attributes']['id'];
+  $id_button = drupal_html_id($id . '-button');
+
+  $js_vars['rules_autocomplete'][$id] = array(
+    'inputId' => $id,
+    'source' => $element['#autocomplete_path'],
+  );
+  drupal_add_js($js_vars, 'setting');
+
+  $output = '<div class="rules-autocomplete">';
+  $output .= '<input' . drupal_attributes($element['#attributes']) . ' />';
+  $output .= '</div>';
+
+
+  return $output;
+}
