How to add more data to a field I'm trying to find the best way to extend a field's data set (not even sure of the right terminology).

What I want, is to attach some other information to an existing field. Let's take a file field, called "my_file", and attach some "other" information to it.

The end result should be, when using node_load and entity_metadata_wrapper, I can get the "other" value.

So these code snippets should give me the value:

$node = node_load($nid);
return $node-&gt;field_my_file['und'][0]['other'];
// And this should work:
$wrapper = entity_metadata_wrapper('node', $node);
return $wrapper-&gt;field_my_file-&gt;other();


I'm not that familiar with the Field API, so if you can point me in the right direction that'd be good.
Hm, if I understand you correctly you want to extend a fields schema. As far as I know, there is no easy way of doing this, e.g. there is no hook_field_schema_alter(). And the way that comes into my mind to achieve this is rather complicated and involves a lot of different hooks and logic that seems just bloated and error prone.

Instead I would recommend to create a new field type module based on the one that you want to extend, then alter this so that it suits your needs. Obviously this should only be done if you are still in the development phase of your site. If there is already any content this could do more harm than good, because you would need to migrate the content.

Another way, little elegant, but certainly possible is to create your proper storage solution for the information that you want to attach to the field(s) in question, meaning providing custom database tables and implementing the hooks described in field.api.php that you need for your use case.