function process_weight

6.x form.inc process_weight($element)

Expand weight elements into selects.

Related topics

1 string reference to 'process_weight'
system_elements in drupal-6.x/modules/system/system.module
Implementation of hook_elements().

File

drupal-6.x/includes/form.inc, line 2164

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;
}