weight_value

  1. drupal
    1. 5
    2. 6
    3. 7
    4. 8
Versions
5 – 7 weight_value(&$form)

If no default value is set for weight select boxes, use 0.

Related topics

Code

includes/form.inc, line 2917

<?php
function weight_value(&$form) {
  if (isset($form['#default_value'])) {
    $form['#value'] = $form['#default_value'];
  }
  else {
    $form['#value'] = 0;
  }
}
?>