You are here

function _text_allowed_values in Content Construction Kit (CCK) 6

Same name and namespace in other branches
  1. 6.3 modules/text/text.module \_text_allowed_values()
  2. 6.2 modules/text/text.module \_text_allowed_values()
3 calls to _text_allowed_values()
theme_text_formatter_default in modules/text/text.module
Theme function for 'default' text field formatter.
theme_text_formatter_plain in modules/text/text.module
Theme function for 'plain' text field formatter.
theme_text_formatter_trimmed in modules/text/text.module
Theme function for 'trimmed' text field formatter.

File

modules/text/text.module, line 232
Defines simple text field types.

Code

function _text_allowed_values($element) {
  $field = content_fields($element['#field_name'], $element['#type_name']);
  if (($allowed_values = content_allowed_values($field)) && isset($allowed_values[$element['#item']['value']])) {
    return $allowed_values[$element['#item']['value']];
  }
}