I do a form alter on a node form and make some callbacks which restrict value lists in a < select > element, which is a entity reference. When the triggering element is changed, I want to load the node forms default value just like it is in the beginning of the form process. I remember there was an api function to do that. Someone nows it?
field_get_default_value - Helper function to get the default value for a field on an entity.
<?php $field = field_info_field('YOURFIELDNAME'); $instance = field_info_instance('node', 'YOURFIELDNAME', 'YOURNODETYPE'); $defvalue = field_get_default_value('node', $node, $field, $instance, $node->language); print_r($defvalue); // Here structure, like $defvalue['value'] ?>