- Patch #130630 by chx: provide an id on the form item wrapper div.

6.x
Dries Buytaert 2007-03-25 19:57:56 +00:00
parent 01cd96dc27
commit 757ac966bb
1 changed files with 5 additions and 1 deletions

View File

@ -1540,7 +1540,11 @@ function theme_file($element) {
* A string representing the form element.
*/
function theme_form_element($element, $value) {
$output = '<div class="form-item">'."\n";
$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'])) {