function ife_alter_form_element in Inline Form Errors 6
Same name and namespace in other branches
- 6.2 ife.module \ife_alter_form_element()
- 7 ife.module \ife_alter_form_element()
Function to add our custom theme to the element
1 call to ife_alter_form_element()
- ife_filter_form in ./
ife.module - Function to recursivly go through a form and alter all valid field type elements
File
- ./
ife.module, line 207 - Drupal hooks
Code
function ife_alter_form_element(&$element, $display) {
// Keep an existing theme function for use in ife theme preprocessing.
if (!empty($element['#theme'])) {
$element['#original_theme'] = $element['#theme'];
}
$element['#theme'] = 'ife_form_element';
//resend the element type, drupal sets the #type marker to markup
$element['#field_type'] = $element['#type'];
//add display type to element to avoid extra queries
$element['#display_type'] = $display;
}