Syntax for getting plain field value in computed field I have a couple of simple computed fields that combine other fields (such as first name and last name) but I'm not getting the right values from the fields. I sometimes get only the first letter of a text field (maybe just on the Title field), and when I call a longtext field I'm getting all the HTML markup when I really only want the plain text version of the field. 

Here's an example where I'm trying to combine a pile of fields for purposes of searching them from one box:

$omnisearch = $entity-&gt;title[LANGUAGE_NONE][0]['value']."
".$entity-&gt;body[LANGUAGE_NONE][0]['value']."
".$entity-&gt;field_prerequisites[LANGUAGE_NONE][0]['value']."
".$entity-&gt;field_keywords[LANGUAGE_NONE][0]['value']."
".$entity-&gt;field_teachers[LANGUAGE_NONE][0]['value']."
".$entity-&gt;field_organizing_center[LANGUAGE_NONE][0]['value']."
".$entity-&gt;field_location[LANGUAGE_NONE][0]['value'];
$entity_field[0]['value'] = $omnisearch;


So is there a better parameter than 'value' to pull the plain/sanitized text from the field? And why am I only getting the first character of the title? I only theoretically grok arrays, so the answer may be obvious to others. Thanks for your help!
I'd suggest you to start by understanding the structure of your entity. You could do something like &lt;pre&gt;&lt;?php print_r($entity); ?&gt;&lt;/pre&gt; to print on screen your entity object and understand how to reference each one of its fields. 

You'll discover that you could get your title just by using $entity-&gt;title (in your example you are getting the first letter because you are treating it as an array).  You could also find that not all your fields might be have by the 'value' key.

Once you do that, you could get the fields values using field_get_items(). A basic example:

$items = field_get_items('node', $entity, 'field_keywords', $entity-&gt;language);
$item = array_shift($items);
$keywords = $item['value'];


And maybe you could take it one step further and wrap that in a reusable function:

/**
 * Get a node field's first value.
 */
function YOUR_MODULE_node_get_field_single_value($node, $field_name, $key) {
  $items = field_get_items('node', $node, $field_name, $node-&gt;language);

  if (!empty($items)) {
    $item = array_shift($items);
    return isset($item[$key]) ? $item[$key] : NULL;
  }
  else {
    return NULL;
  }
}


And call it like this (assuming that this field has a single value in it):

$keywords = YOUR_MODULE_node_get_field_single_value($entity, 'field_keywords', 'value');


Please note that the above function is just an example, your field might have multiple values in it. In that case, you'll need to iterate the array returned by field_get_items.