#181831 by Rob Loach. Backport of #130630 by chx: provide an id on the form item wrapper div.

5.x
Neil Drumm 2008-09-15 06:03:17 +00:00
parent 7166e7c0a3
commit fa1a0765b9
1 changed files with 5 additions and 1 deletions

View File

@ -1538,7 +1538,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'])) {