You are here

function farm_livestock_farm_log_prepopulate_reference_fields in farmOS 7

Implements hook_farm_log_prepopulate_reference_fields().

File

modules/farm/farm_livestock/farm_livestock.module, line 106

Code

function farm_livestock_farm_log_prepopulate_reference_fields($log_type) {

  // Allow field_farm_mother to be prepopulated in birth log forms.
  if ($log_type == 'farm_birth') {
    return array(
      'field_farm_mother' => array(
        'entity_type' => 'farm_asset',
        'url_param' => 'farm_asset',
      ),
    );
  }
}