You are here

ife-form-element.tpl.php in Inline Form Errors 6

Same filename and directory in other branches
  1. 6.2 ife-form-element.tpl.php

Theme implementation to display a form element with it's error.

Available variables:

  • $field: the themed form element.
  • $error_message: The error message(s). Multiple messages are themed as a list.
  • $error: Returns TRUE if the form element has an error.
  • $element: The raw element data (array).

File

ife-form-element.tpl.php
View source
<?php

/**
 * @file
 *
 * Theme implementation to display a form element with it's error.
 *
 * Available variables:
 * - $field: the themed form element.
 * - $error_message: The error message(s). Multiple messages are themed as a list.
 * - $error: Returns TRUE if the form element has an error.
 * - $element: The raw element data (array).
 *
 * @see template_preprocess_ife_form_element()
 */
?>

<?php

print $field;
?>

<?php

if ($error_message) {
  ?>
  <div class="messages error messages-inline"><?php

  print $error_message;
  ?></div>
<?php

}