form_process_weight($element)
drupal/includes/form.inc, line 2236
Expand weight elements into selects.
| Name | Description |
|---|---|
| Form generation | Functions to enable the processing and display of HTML forms. |
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;
}