Hello,

Can anyone see something wrong here ?

I know is that the function theme_mailcatcher_formatter_linktoform isn't called. But I can simply not understand why !

/**
 * Implementation of hook_field_formatter_info().
 */
function mailcatcher_field_formatter_info()
{
  $formatters = array(
    'linktofrom' => array(
      'label' => t('Catches email on download'),
      'field types' => array('filefield'),
      'multiple values' => CONTENT_HANDLE_CORE,
      'description' => t('Change original link to link to the mail catcher'),
    ),
  );
  return $formatters;
}

/**
 * Implementation of hook_theme().
 */
function mailcatcher_theme() {

  $theme = array(
    'mailcatcher_formatter_linktoform' => array(
      'arguments' => array('element' => NULL),
    ),
  );
  return $theme;
}

function theme_mailcatcher_formatter_linktoform()
{
  dsm($element); // NOTHING GOES OUT HERE
  return 'IT WORKS';
}

Comments

mikou’s picture

Sorry, I made a typo. I wrote linktofrom instead of linktoform.