You are here

function node_field_radio_formatter in Node Field 7.2

Formatter for radio field.

1 string reference to 'node_field_radio_formatter'
node_field_types_info in includes/node_field.field.inc
Node field types info.

File

includes/node_field.field.inc, line 318
Field types, settings, widget and formatters.

Code

function node_field_radio_formatter($node_field) {
  $options = node_field_get_options_field_options($node_field);
  if ($node_field['value']) {
    if ($options) {
      return check_plain($options[$node_field['value']]);
    }
  }
  else {
    $default = array_shift($options);
    return check_plain($default);
  }
}