function theme_weight in Drupal 4
Format a weight selection menu.
Parameters
$element: An associative array containing the properties of the element. Properties used: title, delta, description
Return value
A themed HTML string representing the form.
Related topics
File
- includes/
form.inc, line 1125
Code
function theme_weight($element) {
for ($n = -1 * $element['#delta']; $n <= $element['#delta']; $n++) {
$weights[$n] = $n;
}
$element['#options'] = $weights;
$element['#type'] = 'select';
return form_render($element);
}