diff --git a/core/modules/entity_reference/entity_reference.module b/core/modules/entity_reference/entity_reference.module
index 6ad51f7..1345ec5 100644
--- a/core/modules/entity_reference/entity_reference.module
+++ b/core/modules/entity_reference/entity_reference.module
@@ -64,6 +64,45 @@ function entity_reference_entity_field_info_alter(&$info, $entity_type) {
 }
 
 /**
+ * hook_element_info_alter().
+ *
+ * Adds a new process callback to handle the #entity_reference hash key.
+ * The items bellow described the list of accepted parameters for this hash key:
+ *   - type: (optionnal, default: tags) [single|tags]
+ *   - handler: (optionnal, default: default) the entity_reference handler.
+ *   - target_type: the target entity type.
+ *   - handler_settings: (optionnal) An array of handler settings such as
+ *     target_bundles, sort and auto_create.
+ */
+function entity_reference_element_info_alter(&$type) {
+  array_unshift($type['textfield']['#process'], 'entity_reference_process_element');
+}
+
+/**
+ * Adds entity_rerefence functionality to elements with a valid
+ * #autocomplete_path. Also attach the entity_reference validation callback on
+ * the element.
+ *
+ * @param array $element
+ *   The form element to process.
+ * @param array $form_state
+ *   The form state array.
+ *
+ * @return array
+ *   The form element.
+ */
+function entity_reference_process_element($element, &$form_state) {
+  if (empty($element['#autocomplete_path']) && !empty($element['#entity_reference'])) {
+    $element['#autocomplete_path'] = url(
+      'entity_reference/form_element/autocomplete/' . base64_encode(serialize($element['#entity_reference'])),
+      array("absolute" => TRUE)
+    );
+    $element['#element_validate'] = array(array(drupal_container()->get('entity_reference.autocomplete'), 'elementValidate'));
+  }
+  return $element;
+}
+
+/**
  * Gets the selection handler for a given entity_reference field.
  *
  * @return \Drupal\entity_reference\Plugin\Type\Selection\SelectionInterface
diff --git a/core/modules/entity_reference/entity_reference.routing.yml b/core/modules/entity_reference/entity_reference.routing.yml
index e0b23b8..b854a24 100644
--- a/core/modules/entity_reference/entity_reference.routing.yml
+++ b/core/modules/entity_reference/entity_reference.routing.yml
@@ -5,3 +5,10 @@ entity_reference.autocomplete:
     entity_id: 'NULL'
   requirements:
     _access: 'TRUE'
+
+entity_reference.form_element_autocomplete:
+  pattern: '/entity_reference/form_element/autocomplete/{settings}'
+  defaults:
+    _controller: '\Drupal\entity_reference\EntityReferenceController::handleElementAutocomplete'
+  requirements:
+    _access: 'TRUE'
\ No newline at end of file
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php
index a5b41af..b8ab5aa 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php
@@ -99,4 +99,82 @@ public function getMatches($field, $instance, $entity_type, $entity_id = '', $pr
     return $matches;
   }
 
+  /**
+   * Form validate callback for element using #entity_reference hash key.
+   *
+   * @param array $element
+   *   The form element.
+   * @param array $form_state
+   *   The form state array.
+   * @param array $form
+   *   The form array.
+   */
+  public function elementValidate($element, &$form_state, $form) {
+    // Defines both mock field and instance array.
+    $field = array(
+      'settings' => array(
+        'target_type' => $element['#entity_reference']['target_type'],
+      )
+    );
+    $instance = array(
+      'settings' => array(
+        'handler' => $element['#entity_reference']['handler'],
+        'handler_settings' => $element['#entity_reference']['handler_settings'],
+      )
+    );
+    $type = isset($element['#entity_reference']['type']) ? $element['#entity_reference']['type'] : 'tags';
+
+    // If a value was entered into the autocomplete.
+    $handler = entity_reference_get_selection_handler($field, $instance);
+    $bundles = entity_get_bundles($field['settings']['target_type']);
+    $auto_create = isset($instance['settings']['handler_settings']['auto_create']) ? $instance['settings']['handler_settings']['auto_create'] : FALSE;
+
+    $value = '';
+    if (!empty($element['#value'])) {
+      if ($type == 'tags') {
+        $entities = drupal_explode_tags($element['#value']);
+        $value = array();
+        foreach ($entities as $entity) {
+          $match = FALSE;
+
+          // Take "label (entity id)', match the id from parenthesis.
+          if (preg_match("/.+\((\d+)\)/", $entity, $matches)) {
+            $match = $matches[1];
+          }
+          else {
+            // Try to get a match from the input string when the user didn't use
+            // the autocomplete but filled in a value manually.
+            $match = $handler->validateAutocompleteInput($entity, $element, $form_state, $form, !$auto_create);
+          }
+
+          if ($match) {
+            $value[] = array('target_id' => $match);
+          }
+          elseif ($auto_create && (count($instance['settings']['handler_settings']['target_bundles']) == 1 || count($bundles) == 1)) {
+            // Auto-create item. see entity_reference_field_presave().
+            $value[] = array('target_id' => 'auto_create', 'label' => $entity);
+          }
+        }
+      }
+      elseif ($type == 'single') {
+        if (preg_match("/.+\((\d+)\)/", $element['#value'], $matches)) {
+          $value = $matches[1];
+        }
+        else {
+          $value = $handler->validateAutocompleteInput($element['#value'], $element, $form_state, $form, !$auto_create);
+        }
+
+        if (!$value && $auto_create && (count($instance['settings']['handler_settings']['target_bundles']) == 1)) {
+          // Auto-create item. see entity_reference_field_presave().
+          $value = array(
+            'target_id' => 'auto_create',
+            'label' => $element['#value'],
+            // Keep the weight property.
+            '_weight' => $element['#weight'],
+          );
+        }
+      }
+    }
+    form_set_value($element, $value, $form_state);
+  }
 }
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceController.php b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceController.php
index 1301dc3..2939f10 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceController.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceController.php
@@ -97,4 +97,59 @@ public function handleAutocomplete(Request $request, $type, $field_name, $entity
 
     return new JsonResponse($matches);
   }
+
+  /**
+   * Autocomplete the label of a form element.
+   *
+   * @param Request $request
+   *   The request object that contains the typed tags.
+   * @param string $settings
+   *   The entity_reference settings from the element.
+   *
+   * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
+   *   Throws access denied when either the field or field instance does not
+   *   exists or the user does not have access to edit the field.
+   *
+   * @return \Symfony\Component\HttpFoundation\JsonResponse
+   *   The matched labels as json.
+   */
+  public function handleElementAutocomplete(Request $request, $settings) {
+    if (!$settings = unserialize(base64_decode($settings))) {
+      throw new AccessDeniedHttpException();
+    }
+
+    if (!isset($settings['target_type'])) {
+      throw new AccessDeniedHttpException();
+    }
+
+    // Defines both mock field and instance array.
+    $field = array(
+      'settings' => array(
+        'target_type' => $settings['target_type'],
+      )
+    );
+    $instance = array(
+      'settings' => array(
+        'handler' => isset($settings['handler']) ? $settings['handler'] : 'default',
+        'handler_settings' => isset($settings['handler_settings']) ? $settings['handler_settings'] : array('target_bundles' => array()),
+      )
+    );
+    $type = isset($settings['type']) ? $settings['type'] : 'tags';
+
+
+    // Get the typed string, if exists from the URL.
+    $items_typed = $request->query->get('q');
+    $items_typed = drupal_explode_tags($items_typed);
+    $last_item = drupal_strtolower(array_pop($items_typed));
+
+    $prefix = '';
+    // The user entered a comma-separated list of entity labels, so we generate
+    // a prefix.
+    if ($type == 'tags' && !empty($last_item)) {
+      $prefix = count($items_typed) ? drupal_implode_tags($items_typed) . ', ' : '';
+    }
+    $matches = $this->entityReferenceAutocomplete->getMatches($field, $instance, array(), 'NULL', $prefix, $last_item);
+
+    return new JsonResponse($matches);
+  }
 }
