I'm trying to implement a field for a flattr button. It's a really trivial field which takes no input, and thus requires neither a scheme or validation. After looking at the field_example module, I get the impression that this code below should work.
The field shows up as it should, and I can attach it to a bundle, but where I expect the to show up, I get only the fields title, and no actual output what so ever. Looking back at the field_example module, it looks to me like that's just how it outputs data. What am I missing?
function flattr_field_info() {
return array(
'flattr_field' => array(
'label' => t('Field for a flattr button'),
'description' => t('Allows adding flattr buttons to content.'),
'default_widget' => 'flattr_field',
'default_formatter' => 'flattr_button',
),
);
}
function flattr_field_widget_info() {
return array(
'flattr_field' => array(
'label' => t('Flattr button'),
'field types' => array('flattr_field'),
),
);
}
function flattr_field_formatter_info() {
return array (
// This formatter displays the flattr button
'flattr_button' => array(
'label' => t('Flattr button'),
'field types' => array('flattr_field'),
),
);
}