Add custom HTML to custom field In a module, I have defined a custom field. Using hook_field_formatter_info() and hook_field_formatter_view(), I can manage the display of every item (value) within that field. I want to allow the use of multiple values of this field. 

How can I add extra HTML to this 'collection'? Programmatically, from within my module. 

For example, let's say my module adds a 'fruit' field, that allows me to enter its name and its color. Now, I'd like to display this as such:

Name: Strawberry. Color: Red
Name: Orange. Color: Orange
Name: Lime. Color: Green
&lt;some&gt;Extra Html&lt;/some&gt;


How to add that extra last line?

I can find references to hooks that should do it, but I simply don't understand how to tie all these pieces of information together.  I suspect I have to work with: 

hook_field_prepare_view https://api.drupal.org/api/drupal/modules%21field%21field.api.php/function/hook_field_prepare_view/7

I also found this resource suggesting these hooks: http://www.failover.co/blog/drupal-7-custom-field-formatter-hooks-overview

and that I should manipulate the render array.

And I tried just adding an extra element to the array, an extra delta:

$element[] = array(
    '#type' =&gt; 'markup',
    '#markup' =&gt; "Test HTML"
);


But is seems to get ignored by Drupal
It turns out all I needed to do was to use hook_field_prepare_view() to add an extra, empty elements to the $items array

/**
 * Implements hook_field_prepare_view().
 */
function threejs_field_prepare_view($entity_type, $entities, $field, $instances, $langcode, &amp;$items)
{
    $items[1]['footer'] = array( );
}