Is it possible to assign this to this module like in CCK?

Greetings

CKIDOW

Comments

hass’s picture

Version: 6.x-1.5 » 6.x-1.8

I also need this...

hass’s picture

content.module does this to split and filter the values:

  if (empty($allowed_values[$field['field_name']]) && isset($field['allowed_values'])) {
    $list = explode("\n", $field['allowed_values']);
    $list = array_map('trim', $list);
    $list = array_filter($list, 'strlen');
    foreach ($list as $opt) {
      // Sanitize the user input with a permissive filter.
      $opt = content_filter_xss($opt);
      if (strpos($opt, '|') !== FALSE) {
        list($key, $value) = explode('|', $opt);
        $allowed_values[$field['field_name']][$key] = (isset($value) && $value !=='') ? $value : $key;
      }
      else {
        $allowed_values[$field['field_name']][$opt] = $opt;
      }
    }
  }
hass’s picture

Title: Select list ooptions should have key|value property optional » Select list options should have key|value property optional
cardentey’s picture

I also need this...

b-prod’s picture

Version: 6.x-1.8 » 6.x-1.x-dev
Assigned: Unassigned » b-prod
Status: Active » Fixed
ckidow’s picture

Great thanks a lot! :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.