By default in Drupal 7, field descriptions appear below the field. Is there anyway to move them above the field?
In Drupal 6, you could paste the following code in template.php to move the descriptions. However, the code does not work in Drupal 7:
/**
* Place CCK Options above field .
*/
function ThemeNAME_form_element($element, $value) {
$output = ' <div class="form-item"';
if(!empty($element['#id'])) {
$output .= ' id="'. $element['#id'] .'-wrapper"';
}
$output .= ">\n";
$required = !empty($element['#required']) ? '<span class="form-required" title="'.t('This field is required.').'">*</span>' : '';
if (!empty($element['#title'])) {
$title = $element['#title'];
if (!empty($element['#id'])) {
$output .= ' <label for="'. $element['#id'] .'">'. t('!title: !required', array('!title' => filter_xss_admin($title), '!required' => $required)) ."</label> \n";
}
else {
$output .= ' <label>'. t('!title: !required', array('!title' => filter_xss_admin($title), '!required' => $required)) ."</label>\n";
}
}
if (!empty($element['#description'])) {
$output .= ' <div class="description">' . $element['#description'] ."</div> \n";
}
$output .= " $value\n";
$output .= " </div> \n";
return $output;
}