function weight_value in Drupal 5
Same name and namespace in other branches
- 4 includes/form.inc \weight_value()
- 6 includes/form.inc \weight_value()
- 7 includes/form.inc \weight_value()
If no default value is set for weight select boxes, use 0.
Related topics
File
- includes/
form.inc, line 1250
Code
function weight_value(&$form) {
if (isset($form['#default_value'])) {
$form['#value'] = $form['#default_value'];
}
else {
$form['#value'] = 0;
}
}