function _elements_theme_form_element_wrapper in Elements 6
Wrapper for theming a form element to add field prefix and suffix support.
6 calls to _elements_theme_form_element_wrapper()
- theme_emailfield in ./
elements.theme.inc - Returns HTML for an emailfield form element.
- theme_numberfield in ./
elements.theme.inc - Returns HTML for a numberfield form element.
- theme_rangefield in ./
elements.theme.inc - Returns HTML for a rangefield form element.
- theme_searchfield in ./
elements.theme.inc - Returns HTML for a searchfield form element.
- theme_telfield in ./
elements.theme.inc - Returns HTML for a telfield form element.
File
- ./
elements.theme.inc, line 101 - The theme include file for the elements module.
Code
function _elements_theme_form_element_wrapper($element, $output) {
if (isset($element['#field_prefix'])) {
$output = '<span class="field-prefix">' . $element['#field_prefix'] . '</span> ' . $output;
}
if (isset($element['#field_suffix'])) {
$output .= ' <span class="field-suffix">' . $element['#field_suffix'] . '</span>';
}
return theme('form_element', $element, $output);
}