You are here

function theme_money_formatter_unformatted in Money field 6

Display a CCK Money field (unformatted).

File

./money.module, line 395
This module defines the Money CCK field.

Code

function theme_money_formatter_unformatted($element) {
  $amount = isset($element['#item']['amount']) ? $element['#item']['amount'] : NULL;
  if (!is_numeric($amount)) {
    return '';
  }
  $field = content_fields($element['#field_name'], $element['#type_name']);
  $currency = $element['#item']['currency'];

  // Format the whole field based on widget display options.
  return theme('money_field', $amount, $currency, $field['widget']['currency_display_mode'], ' ');
}