process_weight

5 form.inc process_weight($element)
6 form.inc process_weight($element)

Expand weight elements into selects.

Related topics

1 string reference to 'process_weight'

File

includes/form.inc, line 2158

Code

function process_weight($element) {
  for ($n = (-1 * $element['#delta']); $n <= $element['#delta']; $n++) {
    $weights[$n] = $n;
  }
  $element['#options'] = $weights;
  $element['#type'] = 'select';
  $element['#is_weight'] = TRUE;
  $element += _element_info('select');
  return $element;
}

Comments

Drupal 7 function renamed

Login or register to post comments