How can I change the default link to the email contact form? I'm trying to change the default link generate by the email_field module so It shows an image instead of the text (Contact person by email).

I went into the module and foun the part I need to change, but because I'm new to drupal and php I have no clue how to change it...

The code I think I need to override:

function email_field_formatter_view($object_type, $object, $field, $instance,    $langcode, $items, $display) {
  $element = array();
  switch ($display['type']) { 

    case 'email_contact':
      $ids = entity_extract_ids($object_type, $object);
      foreach ($items as $delta =&gt; $item) {
        $element[$delta] = array('#markup' =&gt; l(t('Contact person by email'), 'email/' . $object_type . '/' . $ids[0] . '/' . $instance['field_name']));
        // Since email is always sent to first item's email, break after any email address found.
        break;
      }
      break;
  }
}


The contact person by email is the part I want to change to
'&lt; div class="email_image">&lt; /div>'

Anyone who can help with this? Or knows where I can find some help?

Thx up front.
You have two options to solve your issue:

CSS Option: You can replace text with image using css, add the following code to your css file and make sure to replace field name accordingly 

.field-name-field-custom .field-item a {
  display: block;
  text-indent: -99999em;
  background-image: url('../images/image_name.ext');
  background-position: left top;
  background-repeat: no-repeat;
}


Note: field-custom should be replaced with your email field

Field Formate Option: You can create a new field formate in a new module and then you can choose from Field UI the new formate that you created.

Implement the following code in a Drupal module.

/**
 * Implements hook_field_formatter_info().
 */
function mymodule_field_formatter_info() {
  return array(
    'email_contact_image' =&gt; array(
      'label' =&gt; t('Email contact form image link'),
      'description' =&gt; t('Display an image link to a contact form.'),
      'field types' =&gt; array('email'),
    ),
  );
}

/**
 * Implements hook_field_formatter_view().
 */
function mymodule_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();

  switch ($display['type']) {

    case 'email_contact_image': 

      $ids = entity_extract_ids($entity_type, $entity);

      if ($ids[0] !== NULL) {
        foreach ($items as $delta =&gt; $item) {

          $img_vars = array(
            'path' =&gt; drupal_get_path('theme', 'THEME_NAME') . '/images/IMAGE_NAME.EXT', 
            'alt' =&gt; t('Contact person by email'),
            'title' =&gt; t('Contact person by email'),
            'attributes' =&gt; array('class' =&gt; 'some-img', 'id' =&gt; 'my-img'),
          );
          $img = theme('image', $img_vars);

          $options['html'] = TRUE;

          $element[$delta]['#markup'] = l($img, 'email-contact/' . $entity_type . '/' . $ids[0] . '/' . $instance['field_name'], $options);
          // Since email is always sent to first item's email, break after any email address found.
          break;
        }
      }
      break;
  }

  return $element;
}


Notes: 


make sure to replace mymodule with your own module name
make sure to replace THEME_NAME with your own theme name
make sure to replace IMAGE_NAME.EXT with your own image name


Creating modules - tutorial