diff --git a/autocomplete_widgets.admin.inc b/autocomplete_widgets.admin.inc
index 68a6401..23af9ce 100755
--- a/autocomplete_widgets.admin.inc
+++ b/autocomplete_widgets.admin.inc
@@ -28,12 +28,14 @@ function _autocomplete_widgets_field_widget_settings_form($field, $instance) {
     '#options' => array('starts_with' => t('Starts with'), 'contains' => t('Contains')),
     '#description' => t('Select the method used to collect autocomplete suggestions. Note that <em>Contains</em> can cause performance issues on sites with thousands of records.'),
   );
-  $form['autocomplete_case'] = array(
-    '#type' => 'radios',
-    '#title' => t('Case sensitive'),
-    '#default_value' => $settings['autocomplete_case'],
-    '#options' => array(0 => t('Disabled'), 1 => t('Enabled')),
-  );
+  if ($widget['type'] != 'autocomplete_widgets_node_reference') {
+    $form['autocomplete_case'] = array(
+      '#type' => 'radios',
+      '#title' => t('Case sensitive'),
+      '#default_value' => $settings['autocomplete_case'],
+      '#options' => array(0 => t('Disabled'), 1 => t('Enabled')),
+    );
+  }
 
   switch ($widget['type']) {
     case 'autocomplete_widgets_flddata':
@@ -59,7 +61,7 @@ function _autocomplete_widgets_field_widget_settings_form($field, $instance) {
         '!drupal-strtolower-url' => 'http://api.drupal.org/api/function/drupal_strtolower/6',
       ));
       break;
-  } 
+  }
 
   $form['autocomplete_xss'] = array(
     '#type' => 'radios',
@@ -95,6 +97,22 @@ function _autocomplete_widgets_field_widget_settings_form($field, $instance) {
     );
   }
 
+  if ($widget['type'] == 'autocomplete_widgets_node_reference') {
+    $settings['allowed_node_types'] = !isset($settings['allowed_node_types']) ? array() : $settings['allowed_node_types'];
+    $types = _node_types_build()->types;
+    $options= array();
+    foreach ($types as $key => $value) {
+      $options[$key] = $value->name;
+    }
+    $form['allowed_node_types'] = array(
+      '#type' => 'checkboxes',
+      '#title' => t('Allowed node types'),
+      '#options' => $options,
+      '#default_value' => $settings['allowed_node_types'],
+      '#description' => t('Autocomplete suggestions will be based on the titles of the selected nodes and existing field values.'),
+    );
+  }
+
   return $form;
 
 }
diff --git a/autocomplete_widgets.common.inc b/autocomplete_widgets.common.inc
index be3a775..5d564a0 100755
--- a/autocomplete_widgets.common.inc
+++ b/autocomplete_widgets.common.inc
@@ -47,6 +47,9 @@ function _autocomplete_widgets_get_options($field, $string = '', $match = 'conta
     else if ($field['widget']['type'] == 'autocomplete_widgets_suggested') {
       $results[$cid] = _autocomplete_widgets_get_options_suggested($field, $string, $match, $keys, $limit);
     }
+    else if ($field['widget']['type'] == 'autocomplete_widgets_node_reference') {
+      $results[$cid] = _autocomplete_widgets_get_options_node_reference($field, $string, $match, $keys, $limit);
+    }
     else {
       $results[$cid] = array();
     }
@@ -202,3 +205,46 @@ function _autocomplete_widgets_get_options_suggested($field, $string = '', $matc
   return $options;
 }
 
+/**
+ * Fetch an array of options for the given widget (node_reference).
+ *
+ * Options are retrieved from the titles of the allowed node types.
+ */
+function _autocomplete_widgets_get_options_node_reference($field, $string = '', $match = 'contains', $keys = NULL, $limit = NULL) {
+  $field_name = $field['field_name'];
+  $table = 'field_data_' . $field_name;
+  $column = $field_name . '_value';
+  $options = array();
+
+  $field_query = db_select($table, 'fd')
+    ->fields('fd', array($column));
+
+  $node_title_query = db_select('node', 'n')
+    ->fields('n', array('title'))
+    ->condition('n.type', $field['widget']['settings']['allowed_node_types'], 'IN')
+    ->addTag('node_access');
+
+  if ($string !== '') {
+    switch ($match) {
+      case 'starts_with':
+        $field_query->condition($column, $string . '%', 'LIKE');
+        $node_title_query->condition('n.title', $string . '%', 'LIKE');
+        break;
+      case 'contains':
+      default:
+        $field_query->condition($column, '%' . $string . '%', 'LIKE');
+        $node_title_query->condition('n.title', '%' . $string . '%', 'LIKE');
+        break;
+    }
+    $rows = $node_title_query->execute()->fetchAll(PDO::FETCH_ASSOC);
+    foreach($rows as $row) {
+      $options[$row['title']] = $row['title'];
+    }
+    $rows = $field_query->execute()->fetchAll(PDO::FETCH_ASSOC);
+    foreach($rows as $row) {
+      $options[$row[$column]] = $row[$column];
+    }
+  }
+  sort($options);
+  return $options;
+}
diff --git a/autocomplete_widgets.module b/autocomplete_widgets.module
index a9c196d..24de044 100755
--- a/autocomplete_widgets.module
+++ b/autocomplete_widgets.module
@@ -44,33 +44,41 @@ function autocomplete_widgets_views_api() {
 function autocomplete_widgets_field_widget_info() {
   return array(
     'autocomplete_widgets_allowvals' => array(
-      'label' => t('Autocomplete for allowed values list'), 
+      'label' => t('Autocomplete for allowed values list'),
       'field types' => array('list_text', 'list_integer', 'list_decimal', 'list_float'),
       'settings' => array(
-        'size' => 60, 
-        'autocomplete_match' => 'contains', 
+        'size' => 60,
+        'autocomplete_match' => 'contains',
         'autocomplete_case' => 1,
       ),
     ),
     'autocomplete_widgets_flddata' => array(
-      'label' => t('Autocomplete for existing field data'), 
+      'label' => t('Autocomplete for existing field data'),
       'field types' => array('text'),
       'settings' => array(
-        'size' => 60, 
-        'autocomplete_match' => 'contains', 
+        'size' => 60,
+        'autocomplete_match' => 'contains',
         'autocomplete_case' => 1,
       ),
     ),
     'autocomplete_widgets_suggested' => array(
-      'label' => t('Autocomplete for predefined suggestions'), 
+      'label' => t('Autocomplete for predefined suggestions'),
       'field types' => array('text'),
       'settings' => array(
-        'size' => 60, 
-        'autocomplete_match' => 'contains', 
+        'size' => 60,
+        'autocomplete_match' => 'contains',
+        'autocomplete_case' => 1,
+      ),
+    ),
+    'autocomplete_widgets_node_reference' => array(
+      'label' => t('Autocomplete for existing field data and some node titles'),
+      'field types' => array('text'),
+      'settings' => array(
+        'size' => 60,
+        'autocomplete_match' => 'contains',
         'autocomplete_case' => 1,
       ),
     ),
-
   );
 }
 
@@ -116,10 +124,11 @@ function autocomplete_widgets_field_widget_form(&$form, &$form_state, $field, $i
     '#title' => $element['#title'],
     '#size' => $instance['widget']['settings']['size'],
   );
-  
+
   switch($instance['widget']['type']) {
     case 'autocomplete_widgets_flddata':
     case 'autocomplete_widgets_suggested':
+    case 'autocomplete_widgets_node_reference':
       $element['value'] = array_merge($element['value'], array(
         '#type' => 'textfield',
         '#autocomplete_path' => 'autocomplete_widgets/'. $instance['entity_type'] . '/' . $instance['bundle'] . '/' . $element['#field_name'],
@@ -208,3 +217,64 @@ function autocomplete_widgets_json($entity_type, $bundle_name, $field_name, $str
 function theme_autocomplete_widgets($element) {
   return $element['#children'];
 }
+
+/**
+ * Implements hook_field_formatter_info().
+ */
+function autocomplete_widgets_field_formatter_info() {
+  return array(
+    'autocomplete_widgets_nr' => array(
+      'label' => t('Autocomplete widget node reference'),
+      'description' => t('Displays textfield as a link if there exists an allowed node with that title, otherwise as plain text.'),
+      'field types' => array('text'),
+    ),
+  );
+}
+
+/**
+ * Implements hook_field_formatter_view().
+ */
+function autocomplete_widgets_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
+  $result = array();
+  switch ($display['type']) {
+    case 'autocomplete_widgets_nr':
+    switch ($field['type']) {
+      case 'text' :
+
+        if (isset($items[0]['value'])) {
+          // If there exists a node with that title, display it as a link.
+          $query = new EntityFieldQuery();
+          $nodes = $query->entityCondition('entity_type', 'node')
+            ->entityCondition('bundle', $instance['widget']['settings']['allowed_node_types'], 'IN')
+            ->propertyCondition('title', $items[0]['value'])
+            ->propertyCondition('status', 1);
+
+          $nodes = $nodes->execute();
+          $nid = array();
+          if (isset($nodes['node'])) {
+            foreach ($nodes['node'] as $key => $obj) {
+              $nid[] = $key;
+              // If there are more than one nodes having this title we
+              // only care about the first one.
+              break;
+            }
+          }
+          if(isset($nid[0])) {
+            $node = node_load($nid[0]);
+            return array( array(
+              '#markup' => l($node->title, 'node/' . $node->nid),
+              ),
+            );
+          }
+          // If no node found with this title, display name as plain text.
+          return array( array(
+            '#markup' => $items[0]['value'],
+            ),
+          );
+        }
+        break;
+    }
+    break;
+  }
+  return $result;
+}
