theme_weight
Definition
theme_weight($element)
includes/form.inc, line 1125
Description
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
| Name | Description |
|---|---|
| Form generation | Functions to enable output of HTML forms and form elements. |
Code
<?php
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);
}
?> 