function process_weight in Drupal 6
Same name and namespace in other branches
- 5 includes/form.inc \process_weight()
Expand weight elements into selects.
Related topics
1 string reference to 'process_weight'
- system_elements in modules/
system/ system.module - Implementation of hook_elements().
File
- includes/
form.inc, line 2272
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;
}