Remove tagging on node view I am building a social network with Drupal. I have the following requirement: 


A person who adds a post can tag his friends when adding his posts.
His tagged friends can untag themself when viewing the post.


Requirement #1 was met by the amazingly efficient entity reference view widget (see my recent answer).

But how to achieve requirement #2 ?



What is the best way to implement such a feature? 


Is there any inline editing tool (such as the edit module) for entity reference fields? 
Does editablefields really works for Drupal 7? 
Should I just implement it using the Rules Link module?
Any other approach? 


Please advise.
I tried to define a custom field formatter but it didn't find the hook.

In the end it was much easier to use the Entity Reference Views Formatter module, then theme the view field to add the desired behavior to the relevant link. I used the rules_link module to define the untag link, then added the untag link into the field's theme. Next time I should probably use a tpl.php file as well.

File: views-view-field--with--block--field-with.tpl.php

&lt;?php 
  global $user; 
  $my_uid = $user-&gt;uid;   
  $node = node_load ($row-&gt;nid);
  $results = db_query(      // Load the field without loading the entire node. 
    "SELECT field_with_target_id 
       FROM field_data_field_with 
      WHERE entity_id = :entity_id", 
    array(':entity_id' =&gt;$row-&gt;nid));


  $lines = "";
  foreach($results as $result) {
    $uid = $result-&gt;field_with_target_id;
    $account = user_load((int)$uid);
    $rendered = l(mymodule_get_realname($account), "user/$uid");
    $untag = "";
    if ($uid == $my_uid) {
      $rules_link = rules_link_load('un_tag_me');
      $untag = render(rules_link_render_link($rules_link,$row-&gt;nid));
      $untag = str_replace (
        array("&lt;div ", 'title="x"'), 
        array("&lt;div title='Un-tag me'", 'title="Un-tag me"'), 
        $untag);
    }
    $line = "&lt;div class='field-item'&gt;$rendered $untag&lt;/div&gt;"; 
    $lines .= $line; 
  } 
  if (!empty($lines)) {
    $output = "&lt;div class='field-items'&gt;$lines&lt;/div&gt;";
  }   
  print $output; 
 ?&gt;