theme_weight

Versions
4.7
theme_weight($element)

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

Code

includes/form.inc, line 1125

<?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);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.