diff --git a/entityreference.module b/entityreference.module
index bdcb562..e4bffb0 100644
--- a/entityreference.module
+++ b/entityreference.module
@@ -798,7 +798,6 @@ function entityreference_field_widget_form(&$form, &$form_state, $field, $instan
   }
   $entity_type = $instance['entity_type'];
   $entity = isset($element['#entity']) ? $element['#entity'] : NULL;
-  $handler = entityreference_get_selection_handler($field, $instance, $entity_type, $entity);
 
   if ($instance['widget']['type'] == 'entityreference_autocomplete' || $instance['widget']['type'] == 'entityreference_autocomplete_tags') {
 
@@ -825,8 +824,8 @@ function entityreference_field_widget_form(&$form, &$form_state, $field, $instan
     $entities = entity_load($field['settings']['target_type'], $entity_ids);
 
     foreach ($entities as $entity_id => $entity_item) {
-      $label = $handler->getLabel($entity_item);
-      $key = "$label ($entity_id)";
+      $key = getReference($field, $entity_item); //extract the referenced values
+      //   $key = "$key ($entity_id)"; // removed: not relavent to the user
       // Labels containing commas or quotes must be wrapped in quotes.
       if (strpos($key, ',') !== FALSE || strpos($key, '"') !== FALSE) {
         $key = '"' . str_replace('"', '""', $key) . '"';
@@ -1049,19 +1048,19 @@ function entityreference_autocomplete_callback_get_matches($type, $field, $insta
 
   if (isset($tag_last)) {
     // Get an array of matching entities.
-    $entity_labels = $handler->getReferencableEntities($tag_last, $instance['widget']['settings']['match_operator'], 10);
+    $options = $handler->getReferencableEntities($tag_last, $instance['widget']['settings']['match_operator'], 10);
 
     // Loop through the products and convert them into autocomplete output.
-    foreach ($entity_labels as $values) {
-      foreach ($values as $entity_id => $label) {
-        $key = "$label ($entity_id)";
+    foreach ($options as $values) {
+      foreach ($values as $entity_id => $key) {
+        //  $key = "$reference ($entity_id)"; // removed: not relavelant to users
         // Strip things like starting/trailing white spaces, line breaks and tags.
         $key = preg_replace('/\s\s+/', ' ', str_replace("\n", '', trim(decode_entities(strip_tags($key)))));
         // Names containing commas or quotes must be wrapped in quotes.
         if (strpos($key, ',') !== FALSE || strpos($key, '"') !== FALSE) {
           $key = '"' . str_replace('"', '""', $key) . '"';
         }
-        $matches[$prefix . $key] = '<div class="reference-autocomplete">' . $label . '</div>';
+        $matches[$prefix . $key] = '<div class="reference-autocomplete">' . $key . '</div>';
       }
     }
   }
@@ -1236,14 +1235,14 @@ function entityreference_field_formatter_view($entity_type, $entity, $field, $in
       $handler = entityreference_get_selection_handler($field, $instance, $entity_type, $entity);
 
       foreach ($items as $delta => $item) {
-        $label = $handler->getLabel($item['entity']);
+        $reference = getReference($field, $item['entity']); //get the referenced values
         // If the link is to be displayed and the entity has a uri, display a link.
         // Note the assignment ($url = ) here is intended to be an assignment.
         if ($display['settings']['link'] && ($uri = entity_uri($field['settings']['target_type'], $item['entity']))) {
-          $result[$delta] = array('#markup' => l($label, $uri['path'], $uri['options']));
+          $result[$delta] = array('#markup' => l($reference, $uri['path'], $uri['options'])); //BM changed $label to $reference
         }
         else {
-          $result[$delta] = array('#markup' => check_plain($label));
+          $result[$delta] = array('#markup' => $reference); //check_plain removed to allow users to enter & chanracters
         }
       }
       break;
@@ -1278,6 +1277,33 @@ function entityreference_field_formatter_view($entity_type, $entity, $field, $in
   return $result;
 }
 
+/*
+ *     this code gets the entity property or field property required
+ */
+
+function getReference($field, $entity) {
+  $sort = $field['settings']['handler_settings']['sort'];
+  switch ($sort['type']) {
+    case 'field':
+      $item = explode(':', $sort['field']);
+      $fld = $item[0];
+      $fld_key = $item[1];
+      $val = $entity->$fld;
+      $rtn = $val['und'][0][$fld_key];
+      break;
+
+    case 'property':
+      $key = $sort['property'];
+      $rtn = $entity->$key;
+      break;
+
+    default: //this came from earlier code.  it should never get executed
+      $rtn = check_plain($this->getLabel($entity));
+      break;
+  }
+  return $rtn; //removed checkplain to allow values to have & characters
+}
+
 /**
  * Exception thrown when the entity view renderer goes into a potentially infinite loop.
  */
diff --git a/plugins/selection/EntityReference_SelectionHandler_Generic.class.php b/plugins/selection/EntityReference_SelectionHandler_Generic.class.php
index 444a74c..4468632 100644
--- a/plugins/selection/EntityReference_SelectionHandler_Generic.class.php
+++ b/plugins/selection/EntityReference_SelectionHandler_Generic.class.php
@@ -170,13 +170,37 @@ class EntityReference_SelectionHandler_Generic implements EntityReference_Select
       $entities = entity_load($entity_type, array_keys($results[$entity_type]));
       foreach ($entities as $entity_id => $entity) {
         list(,, $bundle) = entity_extract_ids($entity_type, $entity);
-        $options[$bundle][$entity_id] = check_plain($this->getLabel($entity));
+        $options[$bundle][$entity_id] = $this->getReference($this->field, $entity);
       }
     }
 
     return $options;
   }
 
+  public function getReference($field, $entity) {
+    //this code gets the entity property or field property required
+    $sort = $this->field['settings']['handler_settings']['sort'];
+    switch ($sort['type']) {
+      case 'field':
+        $item = explode(':', $sort['field']);
+        $fld = $item[0];
+        $fld_key = $item[1];
+        $val = $entity->$fld;
+        $rtn = $val['und'][0][$fld_key];
+        break;
+
+      case 'property':
+        $key = $sort['property'];
+        $rtn = $entity->$key;
+        break;
+
+      default: //this came from earlier code.  hopefully it never gets executed again
+        $rtn = $this->getLabel($entity);
+        break;
+    }
+    return $rtn;
+  }
+
   /**
    * Implements EntityReferenceHandler::countReferencableEntities().
    */
@@ -231,7 +255,7 @@ class EntityReference_SelectionHandler_Generic implements EntityReference_Select
       }
       else {
         // Take the one and only matching entity.
-        return key($entities);
+        return key($entities[key($entities)]);
       }
   }
 
@@ -245,9 +269,16 @@ class EntityReference_SelectionHandler_Generic implements EntityReference_Select
       $query->entityCondition('bundle', $this->field['settings']['handler_settings']['target_bundles'], 'IN');
     }
     if (isset($match)) {
-      $entity_info = entity_get_info($this->field['settings']['target_type']);
-      if (isset($entity_info['entity keys']['label'])) {
-        $query->propertyCondition($entity_info['entity keys']['label'], $match, $match_operator);
+      $sort = $this->field['settings']['handler_settings']['sort'];
+      if ($sort['type'] == 'field') {//get field values
+        $item = explode(':', $sort['field']);
+        $fld = $item[0];
+        $fld_key = $item[1];
+        $query->entityCondition($fld . '_' . $fld_key, $match, $match_operator);
+      }
+      elseif ($sort['type'] == 'property') {//get entity properties
+        $key = $sort['property'];
+        $query->propertyCondition($key, $match, $match_operator);
       }
     }
 
@@ -343,6 +374,7 @@ class EntityReference_SelectionHandler_Generic implements EntityReference_Select
     // Return the alias of the table.
     return $query->innerJoin($target_type, NULL, "%alias.$id = $alias.entity_id");
   }
+
 }
 
 /**
