Skip navigation
Help

weight_value

6 form.inc weight_value(&$form)
7 form.inc weight_value(&$form)

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

Related topics

File

drupal/includes/form.inc, line 2891

Code

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