diff --git a/relation_add.info b/relation_add.info
index db1740c..44ae892 100644
--- a/relation_add.info
+++ b/relation_add.info
@@ -1,5 +1,5 @@
-name = Relation Add block
-description = A block to help create relations from the current page's entity to other entities.
+name = Relation Add
+description = A block and a field to help create relations from the current page's entity to other entities.
 core = 7.x
 package = Relation
 dependencies[] = relation
diff --git a/relation_add.module b/relation_add.module
index 233811e..bf3a711 100644
--- a/relation_add.module
+++ b/relation_add.module
@@ -131,7 +131,7 @@ function relation_add_block_form($form, &$form_state) {
     '#empty_value'   => '',
     '#empty_option'  => t('Select a relation type'),
     '#ajax' => array(
-      'callback' => 'relation_add_ajax',
+      'callback' => 'relation_add_block_ajax',
       'wrapper' => 'relation-add-options',
       'method' => 'replace',
       'effect' => 'fade',
@@ -184,7 +184,7 @@ function relation_add_block_form($form, &$form_state) {
 /**
  * AJAX callback for block form.
  */
-function relation_add_ajax($form, $form_state) {
+function relation_add_block_ajax($form, $form_state) {
   return $form['relation_options'];
 }
 
@@ -319,3 +319,535 @@ function relation_add_autocomplete($type = '', $direction = 'target', $string =
   exit();
 }
 
+/**
+ * Implements hook_field_info().
+ */
+function relation_add_field_info() {
+  return array(
+    'relation_add' => array(
+      'label' => t('Relation add'),
+      'description' => t('Stores relationships between entities.'),
+      'settings' => array(),
+      'default_widget' => 'relation_add_default',
+      'default_formatter' => 'relation_add_endpoints_and_fields',
+      'instance_settings' => array('relation_type' => ''),
+    ),
+  );
+}
+
+/**
+ * Implements hook_field_is_empty().
+ */
+function relation_add_field_is_empty($item, $field) {
+  if (!isset($item['relation_options']['rid']) && !isset($item['rid'])) {
+    if (isset($item['relation_options']['targets'])) {
+      $targets_flip = array_flip($item['relation_options']['targets']);
+      if (count($targets_flip) < 2) {
+        $target_key = array_shift($targets_flip);
+        if (empty($item['relation_options']['targets'][$target_key])) {
+          return TRUE;
+        }
+      }
+    }
+    else {
+      return TRUE;
+    }
+  }
+
+  return FALSE;
+}
+
+/**
+ * Implements hook_field_load().
+ */
+function relation_add_field_load($entity_type, $entities, $field, $instances, $langcode, &$items, $age) {
+  foreach ($entities as $id => $entity) {
+    foreach ($instances[$id]['settings']['relation_type'] as $type) {
+      $type_array = explode(':', $type);
+      $relation_types[$type_array[0]] = $type_array[0];
+    }
+
+    $query = relation_query($entity_type, $id);
+    if ($relation_types) {
+      $query->entityCondition('bundle', $relation_types, 'IN');
+    }
+    $relation_ids = array_keys($query->execute());
+    // Who knows why but field does not like if the delta does not start at 0...
+    $items[$id] = array();
+    foreach (entity_load('relation', $relation_ids) as $relation) {
+      $item = (array) $relation;
+      $item['my_entity_id'] = $id;
+      $items[$id][] = $item;
+    }
+  }
+}
+
+/**
+ * Implements hook_field_instance_settings_form().
+ */
+function relation_add_field_instance_settings_form($field, $instance) {
+  $relation_types = relation_get_types();
+  $bundle_key = $instance['entity_type'] . ':' . $instance['bundle'];
+  $bundle_wildcard_key = $instance['entity_type'] . ':' . '*';
+  $options = array();
+  foreach ($relation_types as $relation_type => $relation_type_data) {
+    foreach ($relation_type_data->source_bundles as $relation_bundle_key) {
+      if ($bundle_key == $relation_bundle_key || $bundle_wildcard_key == $relation_bundle_key) {
+        $options[$relation_type] = $relation_type_data->label;
+      }
+    }
+    foreach ($relation_type_data->target_bundles as $relation_bundle_key) {
+      if ($bundle_key == $relation_bundle_key || $bundle_wildcard_key == $relation_bundle_key) {
+        $options[$relation_type . ':reverse'] = $relation_type_data->label;
+      }
+    }
+  }
+  ksort($options);
+
+  $form['relation_type'] = array(
+    '#type' => 'select',
+    '#title' => t('Relation types'),
+    '#description' => t('Select all the relation types you want to display in the dummy field. Only relation types applicable to this entity bundle are show here. If no relation_types are selected, relations of all types will be displayed.'),
+    '#default_value' => $instance['settings']['relation_type'],
+    '#options' => $options,
+    '#multiple' => TRUE,
+  );
+  return $form;
+}
+
+/**
+ * Implements hook_field_widget_settings_form().
+ */
+function relation_add_field_widget_settings_form($field, $instance) {
+  $widget = $instance['widget'];
+  $settings = $widget['settings'];
+
+  $options = array(
+    'endpoint' => 'Endpoint field',
+    'custom' => 'Custom',
+    'none' => 'None',
+  );
+
+  $form['relation_endpoint_label'] = array(
+    '#type' => 'select',
+    '#title' => t('Endpoint label'),
+    '#default_value' => $settings['relation_endpoint_label'],
+    '#options' => $options,
+    '#required' => TRUE,
+    '#weight' => 5,
+  );
+
+  $form['relation_endpoint_custom_label'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Label'),
+    '#default_value' => $settings['relation_endpoint_custom_label'],
+    '#states' => array(
+      'visible' => array(
+        ':input[name="instance[widget][settings][relation_endpoint_label]"]' => array('value' => 'custom'),
+      ),
+    ),
+    '#weight' => 5,
+  );
+
+  $form['relation_endpoint_label_delta'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Adding endpoint delta to the label'),
+    '#default_value' => $settings['relation_endpoint_label_delta'],
+    '#weight' => 5,
+  );
+
+  return $form;
+}
+
+/**
+ * Implements hook_field_widget_info().
+ */
+function relation_add_field_widget_info() {
+  return array(
+    'relation_add' => array(
+      'label' => t('Relation add widget'),
+      'field types' => array('relation_add'),
+    ),
+  );
+}
+
+/**
+ * Implements hook_field_widget_form().
+ */
+function relation_add_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
+  $item = isset($items[$delta]) ? $items[$delta] : array();
+
+  $types = array();
+  if (empty($instance['settings']['relation_type'])) {
+    $relation_types = relation_get_available_types($instance['entity_type'], $instance['bundle']);
+    $reverse_types = relation_get_available_types($instance['entity_type'], $instance['bundle'], 'target');
+
+    if (empty($relation_types) && empty($reverse_types)) {
+      return $element;
+    }
+
+    // Relation type selector. On change, rest of form is loaded via ajax.
+    foreach ($relation_types as $relation_type) {
+      $types[$relation_type->relation_type] = $relation_type->label;
+    }
+    foreach ($reverse_types as $relation_type) {
+      if ($relation_type->directional && $relation_type->max_arity == 2) { // Directional n-ary relations are f@*#ing stupid.
+        // Machine name doesn't have colons, so we add a suffix for reverse relations, which we explode off later.
+        $types[$relation_type->relation_type . ':reverse'] = $relation_type->reverse_label ? $relation_type->reverse_label : 'reverse ' . $relation_type->reverse_label;
+      }
+    }
+  }
+  elseif (count($instance['settings']['relation_type']) > 1) {
+    foreach ($instance['settings']['relation_type'] as $rel_type) {
+      $relation_type = relation_type_load($rel_type);
+      $types[$rel_type] = $relation_type->label;
+    }
+  }
+
+  ksort($types);
+  $wrapper = 'relation-add-options-' . $delta;
+  $form_element = array();
+
+  if (!empty($types)) {
+    if (isset($item['relation_type'])) {
+      if (isset($types[$item['relation_type']])) {
+        $type = $item['relation_type'];
+        $relation_reverse = FALSE;
+      }
+      elseif (isset($types[$item['relation_type'] . ':reverse'])) {
+        $type = $item['relation_type'] . ':reverse';
+        $relation_reverse = TRUE;
+      }
+    }
+
+    $form_element['relation_type'] = array(
+      '#type'          => 'select',
+      '#title'         => t('Relation type'),
+      '#options'       => $types,
+      '#default_value' => isset($default_type) ? $default_type : NULL,
+      '#empty_value'   => '',
+      '#empty_option'  => t('Select a relation type'),
+      '#ajax' => array(
+        'callback' => 'relation_add_widget_ajax',
+        'wrapper'  => $wrapper,
+        'method'   => 'replace',
+        'effect'   => 'fade',
+      ),
+    );
+  }
+  else {
+    $form_element['relation_type'] = array(
+      '#type'  => 'value',
+      '#value' => reset($instance['settings']['relation_type']),
+    );
+  }
+
+  if (isset($form_state['triggering_element']['#ajax'])) {
+    if (!empty($form_state['values'][$field['field_name']][$langcode][$delta]['relation_type'])) {
+      // Remove ':reverse' suffix if it exists, and set reverse flag
+      $type_array = explode(':', $form_state['values'][$field['field_name']][$langcode][$delta]['relation_type']);
+      $type = $type_array[0];
+      $relation_reverse = (isset($type_array[1]) && $type_array[1] == 'reverse');
+    }
+  }
+
+  if (empty($types)) {
+    $type_array = explode(':', reset($instance['settings']['relation_type']));
+    $type = $type_array[0];
+    $relation_reverse = (isset($type_array[1]) && $type_array[1] == 'reverse');
+  }
+
+  $field_parents = $element['#field_parents'];
+  $field_name = $element['#field_name'];
+  $language = $element['#language'];
+
+  $parents = array_merge($field_parents, array($field_name, $language, $delta));
+  $parents[] = 'relation_options';
+  $form_element['relation_options'] = array(
+    '#parents' => $parents,
+    '#prefix' => '<div id="relation-add-options-' . $delta . '">',
+    '#suffix' => '</div>',
+  );
+
+  if (!empty($type)) {
+    if (isset($item) && !empty($item)) {
+      $relation = (object) $item;
+      $relation_type = relation_type_load($relation->relation_type);
+      $default_targets = array();
+      $i = 2;
+      foreach ($item['endpoints'][LANGUAGE_NONE] as $endpoint) {
+        $entities = entity_load($endpoint['entity_type'], array($endpoint['entity_id']));
+        $entity = reset($entities);
+        $label = entity_label($endpoint['entity_type'], $entity);
+        $entity_label = $label . ' [' . $endpoint['entity_type'] . ':' . $endpoint['entity_id'] . ']';
+
+        if ($endpoint['entity_id'] == $item['my_entity_id'] && $endpoint['entity_type'] == $instance['entity_type']) {
+          $default_targets[1] = $entity_label;
+        }
+        else {
+          $default_targets[$i] = $entity_label;
+          $i++;
+        }
+      }
+    }
+    else {
+      $relation_type = relation_type_load($type);
+      $relation = (object) relation_create($type, array());
+    }
+
+    // Create one autocomplete for each endpoint beyond the first
+    $direction = $relation_reverse ? '/source' : '/target';
+
+    $endpoint_title = '';
+    switch ($instance['widget']['settings']['relation_endpoint_label']) {
+      case 'endpoint':
+        $relation_instance = field_info_instance('relation', 'endpoints', $relation_type->relation_type);
+        $endpoint_title = t(check_plain($relation_instance['label']));
+        break;
+      case 'custom':
+        $endpoint_title = t($instance['widget']['settings']['relation_endpoint_custom_label']);
+        break;
+    }
+
+    for ($i = 2; $i <= $relation_type->max_arity; $i++) {
+      $endpoint_title .= $instance['widget']['settings']['relation_endpoint_label_delta'] ? ' ' . ($i - 1) : '';
+      $form_element['relation_options']['targets']['target_' . $i] = array(
+        '#type' => 'textfield',
+        '#title' => $endpoint_title,
+        '#default_value' => isset($default_targets[$i]) ? $default_targets[$i] : '',
+        '#autocomplete_path' => 'relation_add/autocomplete/' . $type . $direction,
+      );
+    }
+
+    if (isset($item['my_entity_id'])) {
+      $form_element['relation_options']['rid'] = array(
+        '#type' => 'value',
+        '#value' => $item['rid'],
+      );
+    }
+    field_attach_form('relation', $relation, $form_element['relation_options'], $form_state);
+    $form_element['delete'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Delete'),
+    );
+
+    unset($form_element['relation_options']['endpoints']);
+  }
+
+  if ($field['cardinality'] == 1) {
+    $form_element['label'] = $element + array(
+      '#type' => 'item'
+    );
+  }
+  return $element + $form_element;
+}
+
+/**
+ * AJAX callback for widget form.
+ */
+function relation_add_widget_ajax($form, $form_state) {
+  $path = $form_state['triggering_element']['#parents'];
+  $field_name = array_shift($path);
+  $language = array_shift($path);
+  $item = array_shift($path);
+
+  return $form[$field_name][$language][$item]['relation_options'];
+}
+
+/**
+ * Implements hook_field_insert().
+ */
+function relation_add_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  relation_add_field_update($entity_type, $entity, $field, $instance, $langcode, $items);
+}
+
+/**
+ * Implements hook_field_update().
+ */
+function relation_add_field_update($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  foreach ($items as $key => $item) {
+    if (isset($item['delete']) && $item['delete']) {
+      if (isset($item['relation_options']['rid']) && $item['relation_options']['rid']) {
+        relation_delete($item['relation_options']['rid']);
+      }
+      continue;
+    }
+
+    $type_array = explode(':', $item['relation_type']);
+    $type = $type_array[0];
+    $relation_reverse = (isset($type_array[1]) && $type_array[1] == 'reverse');
+
+    $entity_label = entity_label($entity_type, $entity);
+    list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
+    $relation_add = $entity_label . ' [' . $entity_type . ':' . $id . ']';
+
+    $entity_strings = array();
+    $targets =& $item['relation_options']['targets'];
+    for ($i = 2; $i; $i++) {
+      if (isset($targets['target_' . $i]) && !empty($targets['target_' . $i])) {
+        $entity_strings[] = $targets['target_' . $i];
+      }
+      else {
+        $i = FALSE; // break loop.
+      }
+    }
+
+    if (is_array($entity_strings) && count($entity_strings)) {
+      // Add the current entity to the endpoints array.
+      if ($relation_reverse) {
+        // For reverse relations, add the "current entity" to the end of the array, else to the start.
+        array_push($entity_strings, $relation_add);
+      }
+      else {
+        array_unshift($entity_strings, $relation_add);
+      }
+
+      $entity_keys = array();
+      foreach ($entity_strings as $r_index => $entity_string) {
+        $matches = array();
+        preg_match('/([\w\s]*)\[([\w\d]+):(\d+)\]/', $entity_string, $matches);
+        if ($matches) {
+          $entity_keys[] = array(
+            'entity_label' => $matches[1],
+            'entity_type' => $matches[2],
+            'entity_id'   => $matches[3],
+            'r_index'     => $r_index,
+          );
+        }
+      }
+
+      if (isset($item['relation_options']['rid'])) {
+        if ($relation = relation_load($item['relation_options']['rid'])) {
+          if ($relation->relation_type == $type) {
+            $relation->endpoints[LANGUAGE_NONE] = $entity_keys;
+          }
+          else {
+            // different relation type
+            relation_delete($item['relation_options']['rid']);
+            $relation = relation_create($type, $entity_keys);
+          }
+        }
+        else {
+          // failed load the relation
+          $relation = relation_create($type, $entity_keys);
+        }
+      }
+      else {
+        $relation = relation_create($type, $entity_keys);
+      }
+
+      $form = $form_state = array();
+      $relation_instances = field_info_instances('relation', $relation->relation_type);
+
+      foreach ($item['relation_options'] as $relation_field_name => $relation_field) {
+        if (isset($relation_instances[$relation_field_name])) {
+          $langcode = array_shift(array_keys($relation_field));
+          $relation_field_items = array_shift($relation_field);
+          $relation_field = field_info_field($relation_field_name);
+
+          field_default_submit('relation', $relation, $relation_field, $relation_instances[$relation_field_name], $langcode, $relation_field_items, $form, $form_state);
+          $relation->{$relation_field_name}[$langcode] = $relation_field_items;
+        }
+        else {
+          $relation->{$relation_field_name} = $relation_field;
+        }
+      }
+
+      relation_save($relation);
+      $items[$key] = (array) $relation;
+    }
+    elseif (isset($item['relation_options']['rid'])) {
+      relation_delete($item['relation_options']['rid']);
+      unset($items[$key]);
+    }
+  }
+}
+
+/**
+ * Implements hook_field_formatter_info().
+ */
+function relation_add_field_formatter_info() {
+  return array(
+    'relation_add_endpoints_and_fields' => array(
+      'label' => t('Endpoints and fields'),
+      'field types' => array('relation_add'),
+    ),
+  );
+}
+
+function relation_add_field_formatter_info_alter(&$info) {
+  $relation_dummy_formaters = array('relation_default', 'relation_otherendpoint', 'relation_natural');
+  foreach ($relation_dummy_formaters as $dummy_formater) {
+    if (isset($info[$dummy_formater])) {
+      $info[$dummy_formater]['field types'][] = 'relation_add';
+    }
+  }
+}
+
+/**
+ * Implements hook_field_formatter_view().
+ */
+function relation_add_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
+  $element = array();
+  list($entity_id) = entity_extract_ids($entity_type, $entity);
+  switch ($display['type']) {
+    case 'relation_add_endpoints_and_fields':
+      foreach ($items as $delta => $item) {
+        $links = array();
+        $relation = (object) $item;
+        foreach (array_filter($relation->endpoints[LANGUAGE_NONE]) as $endpoint) {
+          $related_entities = entity_load($endpoint['entity_type'], array($endpoint['entity_id']));
+          $related_entity = reset($related_entities);
+          if (!($endpoint['entity_type'] == $entity_type && $endpoint['entity_id'] == $entity_id)) {
+            $link = entity_uri($endpoint['entity_type'], $related_entity);
+            $link['href'] = $link['path'];
+            $link['title'] = entity_label($endpoint['entity_type'], $related_entity);
+            $links[] = $link;
+          }
+        }
+
+        $endpoint_title = '';
+        switch ($instance['widget']['settings']['relation_endpoint_label']) {
+          case 'endpoint':
+            $relation_instance = field_info_instance('relation', 'endpoints', $relation->relation_type);
+            $endpoint_title = t(check_plain($relation_instance['label']));
+            break;
+          case 'custom':
+            $endpoint_title = t($instance['widget']['settings']['relation_endpoint_custom_label']);
+            break;
+        }
+
+        $endpoint_title .= $instance['widget']['settings']['relation_endpoint_label_delta'] ? ' ' . ($delta + 1) : '';
+        $element[$delta]['relation']['heading']['#markup'] = t(check_plain($endpoint_title));
+        $element[$delta]['relation']['links'] = array(
+          '#theme' => 'links',
+          '#links' => $links,
+        );
+
+        $relation_view = relation_view($relation);
+        $relation_instances = field_info_instances('relation', $relation->relation_type);
+        foreach (array_keys($relation_instances) as $relation_field_name) {
+          if ($relation_field_name !== 'endpoints') {
+            if (isset($relation_view[$relation_field_name])) {
+              $element[$delta]['relation']['fields'][] = $relation_view[$relation_field_name];
+            }
+          }
+        }
+      }
+      break;
+  }
+
+  return $element;
+}
+
+/**
+ * Implements hook_entity_presave().
+ */
+function relation_add_entity_presave($entity, $entity_type) {
+  if ('relation' == $entity_type) {
+    foreach($entity->endpoints[LANGUAGE_NONE] as $endpoint){
+      $cid = "field:{$endpoint['entity_type']}:{$endpoint['entity_id']}";
+      cache_clear_all($cid, 'cache_field');
+    }
+  }
+}
