Skip navigation
Help

form_process_weight

7 form.inc form_process_weight($element)

Expand weight elements into selects.

Related topics

1 string reference to 'form_process_weight'

File

drupal/includes/form.inc, line 3760

Code

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